Bug 88203 - [perf-test] Make query-selector-last.html more realistic
Summary: [perf-test] Make query-selector-last.html more realistic
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Kentaro Hara
URL:
Keywords:
Depends on:
Blocks: 87625
  Show dependency treegraph
 
Reported: 2012-06-03 18:19 PDT by Kentaro Hara
Modified: 2012-06-03 21:02 PDT (History)
2 users (show)

See Also:


Attachments
Patch (3.48 KB, patch)
2012-06-03 18:24 PDT, Kentaro Hara
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.