WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
46745
Fix perf/class-list-remove test
https://bugs.webkit.org/show_bug.cgi?id=46745
Summary
Fix perf/class-list-remove test
Erik Arvidsson
Reported
2010-09-28 12:09:09 PDT
Fix perf/class-list-remove test
Attachments
Patch
(1.94 KB, patch)
2010-09-28 12:09 PDT
,
Erik Arvidsson
no flags
Details
Formatted Diff
Diff
Patch
(2.21 KB, patch)
2010-09-28 14:56 PDT
,
Erik Arvidsson
no flags
Details
Formatted Diff
Diff
Patch for landing
(2.27 KB, patch)
2010-09-28 15:02 PDT
,
Erik Arvidsson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Erik Arvidsson
Comment 1
2010-09-28 12:09:59 PDT
Created
attachment 69083
[details]
Patch
Darin Adler
Comment 2
2010-09-28 12:16:51 PDT
Comment on
attachment 69083
[details]
Patch For next time, it would be good to explain what was wrong in the change log and why your fix should work. This is especially helpful if the fix is ineffective and someone else is trying to figure out what you meant to do.
Ojan Vafai
Comment 3
2010-09-28 13:54:27 PDT
Comment on
attachment 69083
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=69083&action=review
> LayoutTests/perf/class-list-remove.html:22 > function test1(magnitude) > { > + var s = 'b'; > + element.className = Array(magnitude).join('a ') + s; > element.classList.remove(s);
I worry that this is testing Array.join's perf more than classList.remove. Shouldn't the Array.join be in the setup function? Same with test2.
Ojan Vafai
Comment 4
2010-09-28 14:55:35 PDT
Comment on
attachment 69083
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=69083&action=review
>> LayoutTests/perf/class-list-remove.html:22 >> element.classList.remove(s); > > I worry that this is testing Array.join's perf more than classList.remove. Shouldn't the Array.join be in the setup function? Same with test2.
What I mean is that you should do something like the following. In the setup function: classToUse = Array(magnitude).join('a ') + 'b'; Then in the test function: element.className = classToUse;
Erik Arvidsson
Comment 5
2010-09-28 14:56:03 PDT
Created
attachment 69112
[details]
Patch
Ojan Vafai
Comment 6
2010-09-28 15:00:00 PDT
Comment on
attachment 69112
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=69112&action=review
> LayoutTests/perf/class-list-remove.html:4 > +var element, className, s;
Nit: would be nice to have a more descriptive name than s. classToRemove perhaps?
Erik Arvidsson
Comment 7
2010-09-28 15:00:48 PDT
Comment on
attachment 69112
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=69112&action=review
>> LayoutTests/perf/class-list-remove.html:4 >> +var element, className, s; > > Nit: would be nice to have a more descriptive name than s. classToRemove perhaps?
Done.
Erik Arvidsson
Comment 8
2010-09-28 15:02:45 PDT
Created
attachment 69115
[details]
Patch for landing
WebKit Commit Bot
Comment 9
2010-09-28 15:52:35 PDT
Comment on
attachment 69115
[details]
Patch for landing Clearing flags on attachment: 69115 Committed
r68596
: <
http://trac.webkit.org/changeset/68596
>
WebKit Commit Bot
Comment 10
2010-09-28 15:52:40 PDT
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.
Top of Page
Format For Printing
XML
Clone This Bug