Bug 111389 - Add PerformanceTest for document startup via iframe append/remove
Summary: Add PerformanceTest for document startup via iframe append/remove
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: Eric Seidel (no email)
URL:
Keywords:
Depends on:
Blocks: 110876
  Show dependency treegraph
 
Reported: 2013-03-04 17:47 PST by Eric Seidel (no email)
Modified: 2013-03-07 03:27 PST (History)
9 users (show)

See Also:


Attachments
Patch (1.62 KB, patch)
2013-03-04 17:50 PST, Eric Seidel (no email)
haraken: review+
rniwa: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2013-03-04 17:47:34 PST
Add PerformanceTest for document startup via iframe append/remove
Comment 1 Eric Seidel (no email) 2013-03-04 17:50:02 PST
Created attachment 191367 [details]
Patch
Comment 2 Eric Seidel (no email) 2013-03-04 17:51:04 PST
The poor performance of our iframe startup is the root cause behind the timeouts in bug 110876.
Comment 3 Kentaro Hara 2013-03-04 17:51:43 PST
Comment on attachment 191367 [details]
Patch

Looks good!
Comment 4 Kentaro Hara 2013-03-04 17:51:58 PST
Is someone working on improving the performance?
Comment 5 Eric Seidel (no email) 2013-03-04 17:56:14 PST
%run-perf-tests DOM/iframe-append-remove.html --chromium --release         [/src/WebKit/PerformanceTests]

Running 1 tests
Running DOM/iframe-append-remove.html (1 of 1)
DESCRIPTION: This benchmark tests adding/removing an iframe from the DOM
RESULT DOM: iframe-append-remove: Runs= 69.4810809919 runs/s
median= 69.4740711458 runs/s, stdev= 1.9264792407 runs/s, min= 65.68248037 runs/s, max= 74.5266625482 runs/s
RESULT DOM: iframe-append-remove: JSHeap= 55972944.8 bytes
median= 56490824.0 bytes, stdev= 3181796.3693 bytes, min= 46464360.0 bytes, max= 58860160.0 bytes
RESULT DOM: iframe-append-remove: Malloc= 0.0 bytes
median= 0.0 bytes, stdev= 0.0 bytes, min= 0.0 bytes, max= 0.0 bytes
Finished: 23.599536 s

%run-perf-tests DOM/iframe-append-remove.html --chromium --debug           [/src/WebKit/PerformanceTests]
Running 1 tests
Running DOM/iframe-append-remove.html (1 of 1)
DESCRIPTION: This benchmark tests adding/removing an iframe from the DOM
RESULT DOM: iframe-append-remove: Runs= 4.77791539633 runs/s
median= 4.75796009956 runs/s, stdev= 0.0924369707694 runs/s, min= 4.58572029651 runs/s, max= 4.91179038154 runs/s
RESULT DOM: iframe-append-remove: JSHeap= 9151589.2 bytes
median= 9546816.0 bytes, stdev= 892193.548796 bytes, min= 7730712.0 bytes, max= 10387696.0 bytes
RESULT DOM: iframe-append-remove: Malloc= 0.0 bytes
median= 0.0 bytes, stdev= 0.0 bytes, min= 0.0 bytes, max= 0.0 bytes
Finished: 33.710775 s

Note the values of interest:

Release:
RESULT DOM: iframe-append-remove: Runs= 69.4810809919 runs/s
Debug:
RESULT DOM: iframe-append-remove: Runs= 4.77791539633 runs/s

run-perf-tests is found at WebKit/Tools/Scripts/run-perf-tests
Comment 6 Ryosuke Niwa 2013-03-04 17:57:22 PST
Comment on attachment 191367 [details]
Patch

Please don't add new tests to DOM. This directory should only contain tests imported from chromium's dom_perf test. We should probably rename it to something else and add DOM directory instead.
Comment 7 Eric Seidel (no email) 2013-03-04 17:58:38 PST
(In reply to comment #4)
> Is someone working on improving the performance?

Not to my knowledge.  This came to my attention due to bug 110876, which I investigated (thinking the parser was doing something wrong) and found that v8 startup was completely dominating the -data variants of the test.  Each -data test uses iframe.src="data:..." loads for the subtests.  There are hundreds of subtests in some tests.  Thus in debug, it's not surprising that we're timing out if each frame takes 1/5th of a second to load v8. :)
Comment 8 Eric Seidel (no email) 2013-03-04 18:01:00 PST
(In reply to comment #6)
> (From update of attachment 191367 [details])
> Please don't add new tests to DOM. This directory should only contain tests imported from chromium's dom_perf test. We should probably rename it to something else and add DOM directory instead.

That's absolutely ridiculous.  I added a README to warn future committers.  Please edit it to explain the situation.
Comment 9 Eric Seidel (no email) 2013-03-04 18:01:21 PST
Committed r144704: <http://trac.webkit.org/changeset/144704>
Comment 10 Dan Carney 2013-03-04 22:22:28 PST
(In reply to comment #4)
> Is someone working on improving the performance?

There's an effort to get more or less instant context startup in v8.  It will take some time to get there.
Comment 11 Eric Seidel (no email) 2013-03-04 22:53:16 PST
(In reply to comment #10)
> (In reply to comment #4)
> > Is someone working on improving the performance?
> 
> There's an effort to get more or less instant context startup in v8.  It will take some time to get there.

Currently it looks like it takes about 1000/70 = 14.2ms (nearly a full frame) on my ridiculous Linux desktop.

Glad to hear its on the plan. :)
Comment 12 Adam Barth 2013-03-04 23:27:43 PST
We should run this test on Android to see how long it takes there.
Comment 13 Eric Seidel (no email) 2013-03-05 00:18:00 PST
Agreed.  I'll be away from my linux desktop (and thus Android build) tomorrow, but perhaps one of the folks with CrAndroid WebKit checkouts might try:

run-perf-tests DOM/iframe-append-remove.html --chromium-android --release

and report back. :)
Comment 14 Eric Seidel (no email) 2013-03-05 00:18:28 PST
(In reply to comment #13)
> Agreed.  I'll be away from my linux desktop (and thus Android build) tomorrow, but perhaps one of the folks with CrAndroid WebKit checkouts might try:
> 
> run-perf-tests DOM/iframe-append-remove.html --chromium-android --release
> 
> and report back. :)

Sorry, that changed to Parser/iframe-append-remove.html.