Closed
Bug 534148
Opened 15 years ago
Closed 15 years ago
Speed up InternalGetExistingAttrNameFromQName (speeds up getAttribute/setAttribute, dromaeo)
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Unassigned)
References
Details
If we make atoms UTF-16, we can remove a bunch of string conversions from InternalGetExistingAttrNameFromQName.
That said, should we consider special-casing the case when the input has no ':' in it and just fast-pathing that to an nsAttrName with an atom? Not sure whether this would be faster or slower...
![]() |
Reporter | |
Updated•15 years ago
|
Summary: Speed up InternalGetExistingAttrNameFromQName → Speed up InternalGetExistingAttrNameFromQName (speeds up getAttribute/setAttribute, dromaeo)
Now that bug 534136 is fixed, I'm not sure what else we can do here. As far as I can see what we're doing right now is pretty close to optimal as far as the actual searching for an attribute goes.
The only thing we could do is to atomize the string and just do pointer compares, but I don't think that's faster in the common case when there are relatively few attributes. And, like you say, that only works when there is no ':' in the name.
![]() |
Reporter | |
Comment 2•15 years ago
|
||
It sounds like we did first paragraph of comment 0, right? Probably enough to call this fixed.
Sounds good to me.
I'm still not sure what the second paragraph of comment 0 is about. Hence I'm not sure if it's something we should do or not.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
![]() |
Reporter | |
Comment 4•15 years ago
|
||
The second paragraph was about checking for a ':' and if there isn't one just creating an nsAttrName with an atom in it instead of doing the InternalGetExistingAttrNameFromQName call at all.
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•