The default bug view has changed. See this FAQ.

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

RESOLVED FIXED in mozilla11

Status

()

Core
XPConnect
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: peterv, Assigned: peterv)

Tracking

Trunk
mozilla11
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

6 years ago
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
(Assignee)

Comment 1

6 years ago
Created attachment 572839 [details] [diff] [review]
v1
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....

Updated

6 years ago
Attachment #572839 - Flags: review?(mrbkap) → review+
(Assignee)

Comment 3

6 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/63e4de2dc4bb
Target Milestone: --- → mozilla11
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
Last Resolved: 6 years ago
Resolution: --- → FIXED
No longer blocks: 698919
You need to log in before you can comment on or make changes to this bug.