Compilation times drastically increases after chrome 48
Reported by
ignacio....@gmail.com,
Mar 2 2016
|
|||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36 Steps to reproduce the problem: 1. Big JS file with lot of functions (>100k) 2. Open the HTML which includes this JS file What is the expected behavior? Spent a reasonable amount of time compiling the JS file. What went wrong? Take an unreasonable amount of time. Did this work before? N/A Chrome version: 48.0.2564.116 Channel: n/a OS Version: OS X 10.11.3 Flash Version: Shockwave Flash 20.0 r0 I'm not proud of this 4MB JS file, but... I really think that something is wrong with the compilation after 48. I see a lot of improvement recently (stream compilation and compilation cache) but for us, the results are the opposite. I'll try to trace the compilation but not sure which metrics or how to capture useful info. So please, give me some insight of what you need to confirm if this is an actual bug or where exactly is the problem. Because, this looks pretty important but I don't see people complaining, so maybe is something with GWT JS output or even worst, is a weird case only affecting our project. I'll try with all available (and disabled) code cache flags. And I'll try to reload the page many times or clean the caches. The compilations is always extremely slow (compared with pre 48 chrome). For example, I had an old chromium installed. Both screenshots chrome-33/chrome-48 shows the network result, as you can see the chrome 48 the long times between request are mostly evaluating the scripts. In mobiles, this explodes, and sometimes the evaluation may takes 30seconds or more. Thanks.
,
Mar 2 2016
Might be related to https://bugs.chromium.org/p/v8/issues/detail?id=4422.
,
Mar 2 2016
Might be related to https://bugs.chromium.org/p/v8/issues/detail?id=1902
,
Mar 2 2016
,
Mar 2 2016
,
Mar 3 2016
I can repro that locally with the attached index.html. Chrome 50 was around 50 % of the speed than Chrome 46. Can the test please confirm and bisect?
,
Mar 3 2016
Mac Desktop - Chrome Version 48.0.2564.116 (64-bit) Before: 318.09; After: 5973.10; Diff: 5655.00 Before: 20.37; After: 5536.55; Diff: 5516.180 Before: 20.04; After: 5812.32; Diff: 5792.27 Before: 20.43; After: 5150.73; Diff: 5130.30 Mac Desktop - Chromium Version 47.0.2491.0 (64-bit) Before: 9.70; After: 5366.24; Diff: 5356.53 Before: 9.63; After: 4944.07; Diff: 4934.43 Before: 9.98; After: 646.08; Diff: 636.105 Before: 8.61; After: 702.02; Diff: 693.41 Mac Desktop - Firefox Before: 51.01; After: 3061.16; Diff: 3010.15 Before: 10.24; After: 2774.83; Diff: 2764.59 Android - Firefox Before: 118.94; After: 18746.79; Diff: 18627.85 Android - Chrome last Crash
,
Mar 4 2016
Tested the issue on Mac 10.10.5 using 48.0.2564.116, canary 51.0.2666.0 with below steps: 1.Opened index.html in chrome. 2.Clicked on network tab in dev tools. 3.Observed the speed in index.html. 4.Refreshed the page and observed the speed decreased. Please find attached screencast and update if anything missed here in triaging the issue. ignacio.bacamt@Could you please provide expected behavior screencast for better understanding the issue to triage it further.
,
Mar 4 2016
,
Mar 4 2016
,
Mar 7 2016
Below are the data from different Channels on Mac 10.11.3 using 51.0.2669.0 canary, Stable 49.0.2623.75 and 46.0.2490.86 on first load of the index.html and and refreshed the tab after 3-4 times it seen reduced as below. This observation same on Win 7 and Ubuntu 14.04 as well. # 51.0.2669.0 canary Before: 20.415000000000003; After: 8504.240000000002; Diff: 8483.825 Before: 12.85; After: 852.1600000000001; Diff: 839.3100000000001 # 49.0.2623.75 Stable Before: 287.6; After: 7274.845000000001; Diff: 6987.245000000001 Before: 16.015; After: 847.6700000000001; Diff: 831.6550000000001 # 46.0.2490.86 Before: 251.34500000000003; After: 6542.665000000001; Diff: 6291.320000000001 Before: 9.315000000000001; After: 683.065; Diff: 673.75 hablich@ :cCould you please let us know which data or range need to be considered as good/Bad for further triage the issue.
,
Mar 7 2016
Tested the issue on Mac 10.10.5 using 48.0.2564.116, canary 51.0.2669.0 with below steps: 1.Opened index.html in chrome. 2.Observed the speed before and after refreshing the page as below: Chrome: Before: 271.78; After: 4681.21; Diff: 4409.43 Before: 14.01; After: 4895.51; Diff: 4881.50 Before: 12.24; After: 4539.88; Diff: 4527.63 Firefox: Before: 21.28; After: 25.21; Diff: 3.92 Before: 14.62; After: 15.18; Diff: 0.55 Before: 6.68; After: 6.83; Diff: 0.144 Please find attached screencast. hablich@Could you please provide expected behavior screencast for better understanding the issue to triage it further.
,
Mar 16 2016
Tested the issue on Mac 10.11.3 using chrome version 49.0.2623.87 and canary 51.0.2680.0.Observed almost similar in numbers.Please find the attached screen shot for the same. hablich@ Please suggest the expected behavior to triage the issue further. Thanks,
,
Mar 16 2016
Cbruni@ do you think this is also because of the new JavaScript features in 49. It looks related.
,
Mar 16 2016
Looking at the Octane CodeLoad benchmark, I can account for a 12% loading/parsing regression between roughly 46 and TOT caused by v8. Between 49 and 51 there should be a slight improvement. I would still attribute this to new ES6 features. I hope I manage to get some time to run a file with thousands of function definitions against several v8 versions.
,
Mar 21 2016
Already triage by TE , removing from triaging bucket.
,
Mar 21 2016
,
May 18 2016
We're currently trying out our new performance investigation tool to better pinpoint where we regressed.
,
May 19 2016
On the following picture we can see that the biggest regression (despite the possible parser improvements) happened between 50 and 51 (a +5% on the Group-Total). Note the comparison for items other than the Total are quite off due to how we measured the older versions. We will have to rerun the measurements for adwords as the error-rates are rather high (in the order of the tracked changes), so we cannot give a detailed analysis yet based on our new tool.
,
May 19 2016
,
Jul 11 2016
Just reran the v8-only part over 30 runs: TOT (7f162db) avg = 3.8083870967741933 geomean = 3.800945967553256 result = 3.81 +/- 0.24(6.3%) 5.1 (bf95fd9) avg = 3.6819354838709675 geomean = 3.673208096863653 result = 3.68 +/- 0.26(6.98%) So there is another regression for our TOT.
,
Jul 13 2016
A major regression also occurred for us when loading a 2.5MB minified file of around 4K functions. This loads all at once, in one HTTP request. Although we've been noticing a steady decline in Chrome performance for this loading operation for a little while, this major regression occurred between 52 and 53 for us. It's an overall performance regression of about 20-25%. Note that Safari ever since about Safari 6 on Mac OS X has loaded the exact same file twice as fast (actually that was *before* this regression - now it's even a wider gap between the two).
,
Sep 21 2016
Several issues with our parser have been identified, see progress in https://bugs.chromium.org/p/v8/issues/detail?id=4947
,
Nov 29 2016
,
Dec 7 2016
,
Dec 7 2016
This is issue is almost resolved.
The recent numbers on stable M55 look fairly ok again:
Initial cold load: ~4s
From 4th load on: ~600ms
Cold load on M56: 3.7s (partly broken, see issue 672009 )
Cold load M51: ~5s
Firefox 50.0.2 on the same machine:
Initial load: ~2.8-3.1s
,
Dec 9 2016
On a final measurement on chrome x64 I get 2772 +/- 300ms on M57. Hence, I'd declare success. |
|||||||||||||||
►
Sign in to add a comment |
|||||||||||||||
Comment 1 by ignacio....@gmail.com
, Mar 2 2016I said that the file must have a lot of functions because the JS file generated by GWT contains a really lot of functions something like... function aa(){...} function ab(){...} function ac(){...} ... And traces looks like every function is compiled independently. This is pure speculation, but looks like this per-function compilation is destroying the whole file compilation performance.