Closed
Bug 280363
Opened 20 years ago
Closed 17 years ago
SVG code does long-lived update batches
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Unassigned)
References
Details
Attachments
(1 file)
543 bytes,
application/xhtml+xml
|
Details |
See bug 280214 comment 6. Basically, Begin/EndUpdateViewBatch is meant for
synchronous update batches during which we do not come back to the event loop.
Using this api blocks all painting for the entire viewmanager tree.
Furthermore, while in the middle of an update batch we do not apply invalidates
to the rendering tree. So if a widget move operation happens while in an update
batch (eg scrolling) or someone tries to call Composite() or otherwise paint,
the result will be somewhat unpredictable (see bug 280214 again; invalidates
were basically dropped on the floor there).
So we have the following questions:
1) Should calling disableRefresh on an SVG element really disable all painting
for the viewmanager tree?
2) Why do SVG frames disable all painting between Init() and Reflow()? What if
the frame never gets reflown? Say it's destroyed after Init() but before
Reflow()? (I suspect the right answer is, "this code should be removed").
3) Depending on the answer to #1, does SVG need a new nsIViewManager api to
handle disableRefresh?
Reporter | ||
Comment 1•20 years ago
|
||
This testcase shows SVG permanently disabling painting for the document.
Placed in a frame/iframe, this permanently (until the toplevel page is changed)
disables all painting for the toplevel page and all its frame descendants.
Reporter | ||
Comment 2•20 years ago
|
||
So, as far as the methods on SVGElement go, please see
<http://lists.w3.org/Archives/Public/www-svg/2005Feb/0033.html>. In brief, the
behavior is so poorly defined for suspend/unsuspendRedraw, that I feel that they
should be no-ops in Mozilla. roc says that's what they are in ASV as well, so....
Comment 3•20 years ago
|
||
Until we switch over to a queue-based notification system, these methods are
needed for performance reasons. Our notification batching code depends on them.
So e.g. the JS code
circle.cx.baseVal.value = 10;
circle.cy.baseVal.value = 20;
is slower than
svg.suspendRedraw();
circle.cx.baseVal.value = 10;
circle.cy.baseVal.value = 20;
svg.unsuspendRedraw();
Reporter | ||
Comment 4•20 years ago
|
||
I can leave that part in, and just take out the messing with the viewmanager...
Comment 5•20 years ago
|
||
(In reply to comment #4)
> I can leave that part in, and just take out the messing with the viewmanager...
Sounds good.
Comment 6•17 years ago
|
||
Boris, the patch for bug 340451 got rid of the Begin/EndUpdateViewBatch calls and replaced them with a call to UpdateView.
Reporter | ||
Comment 7•17 years ago
|
||
By "the egin/EndUpdateViewBatch calls" you mean the ones that fall under item 2 in comment 0?
If so, this bug is fixed.
Comment 8•17 years ago
|
||
You fixed item 2 yourself in bug 305246 (which you set as blocking this bug), so I'm assuming you had other things in mind.
At any rate, there are now no longer any instances of the string "UpdateViewBatch" in any SVG files: http://mxr.mozilla.org/seamonkey/search?string=UpdateViewBatch&find=SVG&&tree=seamonkey
Reporter | ||
Comment 9•17 years ago
|
||
No, bug 305246 fixed item 1.
Sounds like this is fixed. Most excellent.
You need to log in
before you can comment on or make changes to this bug.
Description
•