RESOLVED FIXED 77845
Use Element's hasName/hasID flags to avoid unnecessary work when looking up name/id attributes.
https://bugs.webkit.org/show_bug.cgi?id=77845
Summary Use Element's hasName/hasID flags to avoid unnecessary work when looking up n...
Andreas Kling
Reported 2012-02-05 20:17:01 PST
HTMLCollection: Use Element's hasName/hasID flags to avoid unnecessary work.
Attachments
Patch (7.36 KB, patch)
2012-02-05 20:17 PST, Andreas Kling
ggaren: review+
Patch v2 (21.29 KB, patch)
2012-02-11 05:58 PST, Andreas Kling
no flags
Andreas Kling
Comment 1 2012-02-05 20:17:52 PST
Geoffrey Garen
Comment 2 2012-02-08 08:46:39 PST
Comment on attachment 125557 [details] Patch This patch makes me think the following refactoring would be a good idea: (1) Change getIdAttribute() to check hasID() for you; (2) Add a getNameAttribute() that works just like getIdAttribute(). Now, as long as you use these functions when getting name and/or id, everything is fast, and you remove a lot of the code you've introduced in this patch.
Andreas Kling
Comment 3 2012-02-11 05:58:01 PST
Created attachment 126631 [details] Patch v2 Better patch with getIdAttribute() and getNameAttribute() as suggested by Geoff.
Andreas Kling
Comment 4 2012-02-11 06:50:36 PST
Comment on attachment 126631 [details] Patch v2 Clearing flags on attachment: 126631 Committed r107477: <http://trac.webkit.org/changeset/107477>
Andreas Kling
Comment 5 2012-02-11 06:50:45 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.