Closed Bug 378389 Opened 18 years ago Closed 15 years ago

Consider keeping track of preserved wrappers as an nsINode bit

Categories

(Core :: DOM: Core & HTML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 457022

People

(Reporter: bzbarsky, Unassigned)

References

Details

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.
Blocks: 377787
Note that with sicking's patch to short-circuit traversal of currently-displayed documents this may not be as much of a problem anymore...
Assignee: general → nobody
QA Contact: ian → general
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
Closed: 15 years ago
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.