Add PerformanceTest for document startup via iframe append/remove
Created attachment 191367 [details] Patch
The poor performance of our iframe startup is the root cause behind the timeouts in bug 110876.
Comment on attachment 191367 [details] Patch Looks good!
Is someone working on improving the performance?
%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 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.
(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. :)
(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.
Committed r144704: <http://trac.webkit.org/changeset/144704>
(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.
(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. :)
We should run this test on Android to see how long it takes there.
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. :)
(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.