Speed up BindToTree/UnbindFromTree

RESOLVED FIXED

Status

()

Core
DOM
RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: sicking, Assigned: sicking)

Tracking

(Blocks: 1 bug)

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

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.
Created attachment 444250 [details] [diff] [review]
Speed up accesskey

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)
Created attachment 444251 [details] [diff] [review]
Speed up XBL

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 4

8 years ago
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 5

8 years ago
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+
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
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.