Bug 88203

Summary: [perf-test] Make query-selector-last.html more realistic
Product: WebKit Reporter: Kentaro Hara <haraken>
Component: Tools / TestsAssignee: Kentaro Hara <haraken>
Status: RESOLVED FIXED    
Severity: Normal CC: rniwa, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 87625    
Attachments:
Description Flags
Patch none

Description Kentaro Hara 2012-06-03 18:19:57 PDT
query-selector-last.html tests querySelector() for an element that appears after 1000 div elements, all of which have the same id and class.

To test the performance of querySelector() under a lot of ids and classes, we should make the ids and classes of the 1000 elements different.
Comment 1 Kentaro Hara 2012-06-03 18:24:52 PDT
Created attachment 145500 [details]
Patch
Comment 2 Ryosuke Niwa 2012-06-03 18:36:40 PDT
Comment on attachment 145500 [details]
Patch

Conversely, should we have a test where we have lots of duplicate ids as well?
Comment 3 Kentaro Hara 2012-06-03 19:17:01 PDT
(In reply to comment #2)
> (From update of attachment 145500 [details])
> Conversely, should we have a test where we have lots of duplicate ids as well?

Good point. For example, getElementById() (which is internally called by querySelector()) traces different call paths for duplicated ids. I'll add the test in another patch.
Comment 4 WebKit Review Bot 2012-06-03 19:25:07 PDT
Comment on attachment 145500 [details]
Patch

Clearing flags on attachment: 145500

Committed r119366: <http://trac.webkit.org/changeset/119366>
Comment 5 WebKit Review Bot 2012-06-03 19:25:10 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Kentaro Hara 2012-06-03 21:02:32 PDT
(In reply to comment #3)
> (In reply to comment #2)
> > (From update of attachment 145500 [details] [details])
> > Conversely, should we have a test where we have lots of duplicate ids as well?
> 
> Good point. For example, getElementById() (which is internally called by querySelector()) traces different call paths for duplicated ids. I'll add the test in another patch.

Hmm, it might not be worth adding. DOM/GetElement.html already tests duplicate id cases.