Closed
Bug 467422
Opened 16 years ago
Closed 4 years ago
Optimize BindToTree/UnbindFromTree
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: smaug, Assigned: smaug)
References
Details
Attachments
(3 files)
(deleted),
text/html
|
Details | |
(deleted),
text/html
|
Details | |
(deleted),
patch
|
Details | Diff | Splinter Review |
The testcase shows that we do too many addrefs/releases (partly because of bug 355221, which I hope we could back out now) and HTML's contentEditable code
could be faster.
Assignee | ||
Comment 1•16 years ago
|
||
Assignee | ||
Comment 2•16 years ago
|
||
This reduces Addref/Release significantly and speeds up bindToTree perf up to 10%.
Comment 3•16 years ago
|
||
Don't we need to make absolutely sure all instances of script running under BindToTree are fixed first? That includes anything that could spin an event loop (e.g. iframes).
Assignee | ||
Comment 4•16 years ago
|
||
That is why I started to add bugs to "depends on" -field.
Assignee | ||
Comment 5•16 years ago
|
||
Comment on attachment 351229 [details] [diff] [review]
nsCOMPtr<nsIContent> -> nsIContent*
I think we could take this to trunk now.
Attachment #351229 -
Flags: superreview?(bzbarsky)
Attachment #351229 -
Flags: review?(bzbarsky)
Comment 6•16 years ago
|
||
Is that comment about removing still valid?
I assume we're relying on extensions not touching the DOM here, right? Because extension JS can certainly run under BindToTree... :(
_if_ we can really rely on no one touching the DOM while we do these loops, we could use GetChildArray for another possible performance boost (though we already avoid the virtual function call overhead, I guess). But that approach would be _really_ bad if someone's touching the DOM... Then again, so is removing the strong refs. :(
Assignee | ||
Comment 7•16 years ago
|
||
(In reply to comment #6)
> I assume we're relying on extensions not touching the DOM here, right? Because
> extension JS can certainly run under BindToTree... :(
You mean content policies or such? If yes, I guess those should be postponed
using script runner...
The comment is valid if extensions don't do anything evil :/
Assignee | ||
Updated•16 years ago
|
Attachment #351229 -
Flags: superreview?(bzbarsky)
Attachment #351229 -
Flags: review?(bzbarsky)
Comment 8•16 years ago
|
||
I mean content policies (which cannot be postponed unless we postpone the load as a whole). I also mean necko notification listeners (fired synchronously as necko learns about the loads).
Perhaps we should simply move all network access out from under BindToTree and AttributeChanged into script runners...
I assume you meant the comment is _invalid_ if extensions don't do anything evil? It says the node can remove itself; I don't see how it could.
Note that "evil" for purposes of this code means mutating any part of any DOM, not just of the DOM we're working on here.
Assignee | ||
Comment 9•16 years ago
|
||
(In reply to comment #8)
> I assume you meant the comment is _invalid_ if extensions don't do anything
> evil?
Oops, right.
Assignee | ||
Comment 10•16 years ago
|
||
Bug 490695 should speed up things a bit.
Comment 11•4 years ago
|
||
Closing as this is 12 years old. Feel free to reopen if this is somehow still relevant though Olli.
Updated•4 years ago
|
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
Assignee | ||
Comment 12•4 years ago
|
||
Snow-white made AddRef/Release of cycle collectable objects a lot faster, and on the main thread there is also the nursery purple buffer improving that even further, so closing is fine :)
You need to log in
before you can comment on or make changes to this bug.
Description
•