Bug 21052 - Generalize id selector special case for querySelectorAll
Summary: Generalize id selector special case for querySelectorAll
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Enhancement
Assignee: David Smith
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-24 02:05 PDT by David Smith
Modified: 2008-09-25 13:56 PDT (History)
0 users

See Also:


Attachments
Patch; Passes run-webkit-tests and doesn't regress http://ejohn.org/apps/selectortest/#target (4.06 KB, patch)
2008-09-24 02:21 PDT, David Smith
timothy: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Smith 2008-09-24 02:05:46 PDT
Currently we special case only a raw id selector. Patch forthcoming shortly to expand this to any selector with an id selector as its rightmost element, at a small cost in special case speed.

Changes results from:
#title: 2ms
h1#title: 55ms
div #title: 55ms

to:
#title: 1ms (test variance? it shouldn't have sped up...)
h1#title: 2ms
div #title: 5ms
Comment 1 David Smith 2008-09-24 02:21:09 PDT
Created attachment 23745 [details]
Patch; Passes run-webkit-tests and doesn't regress http://ejohn.org/apps/selectortest/#target
Comment 2 David Smith 2008-09-25 13:56:47 PDT
Fixed in r36907