Closed Bug 564591 Opened 12 years ago Closed 12 years ago

Speed up BindToTree/UnbindFromTree

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: sicking, Assigned: sicking)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

We're doing too much work in BindToTree/UnbindFromTree. We should optimize it more for performance. I'll start with a couple of simple patches to use nsINode flags to avoid doing work unless necessary.
Avoid searching for accesskey attribute on each bind/unbind unless such an attribute exists. Use a flag to indicate when the attribute is set.
Assignee: nobody → jonas
Attachment #444250 - Flags: review?(Olli.Pettay)
Attached patch Speed up XBLSplinter Review
Only call into XBL code when NODE_MAY_BE_IN_BINDING_MNGR is set. Also clean up the signature for nsBindingManager::ChangeDocumentFor.

There are other ChangeDocumentFor functions that should likely be cleaned up, but I wanted to focus on just the perf critical BindToTree/UnbindFromTree code in this bug.
Attachment #444251 - Flags: review?(Olli.Pettay)
The last chunk of the accesskey patch looks like it belongs in the XBL patch.
Comment on attachment 444250 [details] [diff] [review]
Speed up accesskey

The XBL part shouldn't be in this patch.

Please make sure we have tests for accesskey changes, and if we don't, add
some.
Attachment #444250 - Flags: review?(Olli.Pettay) → review+
Comment on attachment 444251 [details] [diff] [review]
Speed up XBL

Yeah, I was going to do this myself :)
Attachment #444251 - Flags: review?(Olli.Pettay) → review+
Duplicate of this bug: 564576
Comment on attachment 444251 [details] [diff] [review]
Speed up XBL

Had to back this out due to burnings.
Landed a new patch that's merged to trunk. Another ChangeDocumentFor caller had been added which needed to use RemovedFromDocument.

So these two checkins are the final ones:
http://hg.mozilla.org/mozilla-central/rev/f792d441a233
http://hg.mozilla.org/mozilla-central/rev/058e0244ecf6
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.