Bug 71939

Summary: [MutationObservers] Microbenchmarks for appendChild, removeChild, and innerHTML
Product: WebKit Reporter: Adam Klein <adamk>
Component: New BugsAssignee: Adam Klein <adamk>
Status: RESOLVED FIXED    
Severity: Normal CC: ojan, rafaelw
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 68729    
Attachments:
Description Flags
Patch
none
Bumped depth to 200
none
Remove braces ojan: review+

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>