Closed Bug 700668 Opened 13 years ago Closed 13 years ago

Don't enumerate all compartments for every traversal of a XPCWrappedNative

Categories

(Core :: XPConnect, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla11

People

(Reporter: peterv, Assigned: peterv)

References

Details

Attachments

(1 file)

This is showing up in profiles in bug 696761. We should only look for expando objects if we know we ever had one for the XPCWrappedNative that we're traversing. Patch coming up.
Blocks: 698919
Attached patch v1Splinter Review
Attachment #572839 - Flags: review?(mrbkap)
So without this patch we do O(number of live compartments) work for every XPCWrappedNative that we traverse?

That could certainly explain the profiles I'm seeing, if I have lots of compartments and lots of XPCWrappedNatives around....
Attachment #572839 - Flags: review?(mrbkap) → review+
Is this something we could safely backport?
For what it's worth, I just checked and I seem to have 425 compartments in the compartment map over here...  Is there any way we could just avoid the linear scan?
https://hg.mozilla.org/mozilla-central/rev/63e4de2dc4bb
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
No longer blocks: 698919
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: