If we make AddReference/RemoveReference take an nsINode*, not a void* as the key, we could set a bit on the node when the reference is added and remove it when it's removed. Then during cycle collection we could check that bit before hitting the hashtable. Since most nodes don't have a preserved wrapper, this ought to be a win, I think.
Note that with sicking's patch to short-circuit traversal of currently-displayed documents this may not be as much of a problem anymore...
I'm going to dupe this to bug 457022 (cached wrappers), since we only traverse to the cached wrapper if a bit is set (see WRAPPER_BIT_PRESERVED) and we only put the objects in a hash if they have a preserved wrapper.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 457022
You need to log in before you can comment on or make changes to this bug.