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
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]
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:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

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]
Comment 2 Boris Zbarsky [:bz] (TPAC) 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
Comment 4 Boris Zbarsky [:bz] (TPAC) 2011-11-09 11:07:50 PST
Is this something we could safely backport?
Comment 5 Boris Zbarsky [:bz] (TPAC) 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

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