Last Comment Bug 700668 - Don't enumerate all compartments for every traversal of a XPCWrappedNative
: Don't enumerate all compartments for every traversal of a XPCWrappedNative
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: Trunk
: All All
: -- normal with 1 vote (vote)
: mozilla11
Assigned To: Peter Van der Beken [:peterv]
:
: Andrew Overholt [:overholt]
Mentors:
Depends on:
Blocks: 696761
  Show dependency treegraph
 
Reported: 2011-11-08 07:51 PST by Peter Van der Beken [:peterv]
Modified: 2012-01-09 10:42 PST (History)
10 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
v1 (6.27 KB, patch)
2011-11-08 09:07 PST, Peter Van der Beken [:peterv]
mrbkap: review+
Details | Diff | Splinter Review

Description Peter Van der Beken [:peterv] 2011-11-08 07:51:43 PST
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.
Comment 1 Peter Van der Beken [:peterv] 2011-11-08 09:07:24 PST
Created attachment 572839 [details] [diff] [review]
v1
Comment 2 Boris Zbarsky [:bz] (still a bit busy) 2011-11-08 12:01:05 PST
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....
Comment 3 Peter Van der Beken [:peterv] 2011-11-09 05:07:31 PST
https://hg.mozilla.org/integration/mozilla-inbound/rev/63e4de2dc4bb
Comment 4 Boris Zbarsky [:bz] (still a bit busy) 2011-11-09 11:07:50 PST
Is this something we could safely backport?
Comment 5 Boris Zbarsky [:bz] (still a bit busy) 2011-11-09 22:05:27 PST
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?
Comment 6 Marco Bonardo [::mak] 2011-11-10 03:07:44 PST
https://hg.mozilla.org/mozilla-central/rev/63e4de2dc4bb

Note You need to log in before you can comment on or make changes to this bug.