Open Bug 395058 Opened 19 years ago Updated 4 years ago

getAnonymousElementByAttribute is slowing Ts / Txul

Categories

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

x86
SunOS
defect

Tracking

()

People

(Reporter: sayrer, Unassigned)

Details

(Keywords: perf)

Attachments

(1 file)

This function is a major hotspot for the JS that executes in chrome on startup. I'm not sure whether this is due to overall tabbrowser.xml complexity, or there's something inherently slow about it. Is there a reason we can't use other methods of selecting these elements?
Do you have any data on what attribute names are searched? If it's a lot of 'id', it'd probably help to atomize the value before searching in the implementation.
So, I think I see why we're detecting slow calls here, but Stuart's profiles don't show it. They're nesting: 61811 tabbrowser.xml | -> getAnonymousElementByAttribute 4257760 tabbrowser.xml | -> getAnonymousElementByAttribute 5228638 scrollbox.xml | -> getAnonymousElementByAttribute Timeless tells me this is because of XBL lazy binding.
So what I think we should do here is to make "anonid" always stored as an atom, and then make getAnonymousElementByAttribute use atom-values when doing the searching. Not sure that it'll make a big difference, but it might help a bit.
Component: General → DOM
Product: Firefox → Core
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046 Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5. If you have questions, please contact :mdaly.
Priority: -- → P5
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: