Closed Bug 406692 Opened 12 years ago Closed 12 years ago

DOM node wrapping optimization (nsNodeSH::PreCreate()).

Categories

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

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla1.9beta2

People

(Reporter: jst, Assigned: jst)

References

Details

(Keywords: perf)

Attachments

(1 file)

nsNodeSH::PreCreate() keeps showing up as a hotspot in profiles (see bug 375225), the expensive part of that is that we wrap the nodes parent, which again wraps its parent etc, going on depending what the parent chain should be etc. The common case by far is that a node's parent (as far as JSObject parent goes) is the document, so thus if we had a fast path from an nsIDocument pointer to its JSObject, we wouldn't need to wrap the document. Fixing that alone shaves off about 5% of the XPConnect overhead in bug 375225.
Attachment #291356 - Flags: superreview?(peterv)
Attachment #291356 - Flags: review?(peterv)
Blocks: 375225
Attachment #291356 - Flags: superreview?(peterv)
Attachment #291356 - Flags: superreview+
Attachment #291356 - Flags: review?(peterv)
Attachment #291356 - Flags: review+
Fix checked in.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
Keywords: perf
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.