Closed Bug 23715 Opened 25 years ago Closed 25 years ago

[perf] prime atom table with ID to improve nsXULElement::GetID() efficiency

Categories

(Core :: XUL, defect, P3)

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: waterson, Assigned: waterson)

Details

Attachments

(1 file)

This should dramatically reduce the cost of NS_NewAtom() when getting an object's ID for style rule matching. (Currently, shows up in profile as ~2% of time spent scrolling e.g. the mailnews window.)
Status: NEW → ASSIGNED
Target Milestone: M13
Summary: use nsIAtoms to key the nsXULDocument's element map → [perf] prime atom table with ID to improve nsXULElement::GetID() efficiency
ok. i have a better way to fix this. nsXULAttribute::SetValueInternal() is where we decide whether or not to atomize the attribute value. i'm going to make it always atomize for the 'id' attribute, regardless of link. i'm also going to add an API to nsXULAttribute that allows us to get at the atom value directly, so that GetID() can avoid pulling the value out into a string, and then re-atomizing the string.
Good. This should give us another 2-3%.
Attached patch proposed fix (deleted) — Splinter Review
hyatt: can you review this manky patch? there's a bit of cruft in it left over in it from 20724 ("union { mContent }"), but just ignore that.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
fix checked in.
BULK MOVE: Changing component from XUL to XP Toolkit/Widgets: XUL. XUL component will be deleted.
Component: XUL → XP Toolkit/Widgets: XUL
please ignore, massive spam giving jrgm@netscape.com backlog of XPToolkits resolved fixed bugs to verify
QA Contact: paulmac → jrgm
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: