Bug 71939 - [MutationObservers] Microbenchmarks for appendChild, removeChild, and innerHTML
Summary: [MutationObservers] Microbenchmarks for appendChild, removeChild, and innerHTML
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adam Klein
URL:
Keywords:
Depends on:
Blocks: 68729
  Show dependency treegraph
 
Reported: 2011-11-09 11:17 PST by Adam Klein
Modified: 2011-11-10 10:42 PST (History)
2 users (show)

See Also:


Attachments
Patch (11.10 KB, patch)
2011-11-09 11:24 PST, Adam Klein
no flags Details | Formatted Diff | Diff
Bumped depth to 200 (11.10 KB, patch)
2011-11-09 11:38 PST, Adam Klein
no flags Details | Formatted Diff | Diff
Remove braces (11.02 KB, patch)
2011-11-09 11:57 PST, Adam Klein
ojan: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Klein 2011-11-09 11:17:00 PST
[MutationObservers] Microbenchmarks for appendChild, removeChild, and innerHTML
Comment 1 Adam Klein 2011-11-09 11:24:27 PST
Created attachment 114324 [details]
Patch
Comment 2 Adam Klein 2011-11-09 11:38:24 PST
Created attachment 114330 [details]
Bumped depth to 200
Comment 3 Adam Klein 2011-11-09 11:57:45 PST
Created attachment 114335 [details]
Remove braces
Comment 4 Ojan Vafai 2011-11-09 19:20:09 PST
Comment on attachment 114335 [details]
Remove braces

View in context: https://bugs.webkit.org/attachment.cgi?id=114335&action=review

Looks fine. I have some personal stylistic nits that would make the code seem more natural to me, but you can ignore them. I only listed them for the first tests, but obviously the same nits apply to all the tests.

> PerformanceTests/Mutation/append-child-deep.html:23
> +    window.start = null;
> +    window.numRuns = 25;
> +    window.times = [];

Using "window." here seems weird to me. Just use start/numRuns/times. It'll do the same thing right?

> PerformanceTests/Mutation/append-child-deep.html:32
> +        var time = new Date().getTime() - start;

Nit: Use Date.now()

> PerformanceTests/Mutation/append-child-deep.html:43
> +        start = new Date().getTime();

ditto
Comment 5 Adam Klein 2011-11-10 10:39:00 PST
Comment on attachment 114335 [details]
Remove braces

View in context: https://bugs.webkit.org/attachment.cgi?id=114335&action=review

>> PerformanceTests/Mutation/append-child-deep.html:23
>> +    window.times = [];
> 
> Using "window." here seems weird to me. Just use start/numRuns/times. It'll do the same thing right?

Just a clash of stylistic preferences, I guess: I wanted to avoid declaring these variables, but still wanted to make it clear that I _knew_ they were being set on the global scope.

>> PerformanceTests/Mutation/append-child-deep.html:32
>> +        var time = new Date().getTime() - start;
> 
> Nit: Use Date.now()

Ah, yes, nicer.
Comment 6 Adam Klein 2011-11-10 10:42:09 PST
Committed r99879: <http://trac.webkit.org/changeset/99879>