Animometer leaves benchmark processes hundreds of tasks from ImageQualityController |
||||||
Issue descriptionGoogle Chrome 52.0.2713.0 (Official Build) canary (64-bit) Revision 939788c10e98a18cb74d5311f8792105930d9bd9-refs/heads/master@{#388380} OS Mac OS X src_file "../../third_party/WebKit/Source/core/layout/ImageQualityController.cpp" src_func "restartTimer"
,
Apr 21 2016
Attached is a trace with the CL from https://codereview.chromium.org/1909063003 applied. Notice the nice gaps between the BeginMainFrame tasks and that nothing is scheduled on the main thread on top of the raster tasks.
,
Apr 21 2016
This is a great find!
,
Apr 21 2016
chrishtr@ Said he'd fix this. :)
,
Apr 22 2016
,
Apr 24 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40 commit f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40 Author: chrishtr <chrishtr@chromium.org> Date: Sun Apr 24 00:02:33 2016 Don't restart the ImageQualityController timer unless it is already half over. Restarting the timer every time an image continues to animate is very expensive, because there is no way to actuually cancel the existing timer. Instead, the timer is neutered, so that when it fires it will do nothing. This results in a flood of no-op timer callbacks in the referenced bug scenario. Instead, only restart the timer if the current frame time is more than half of the timer time later than the frame time at the start of the timer. To accomplish that, record the current frame time in WebViewImpl, so that it can be compared with a future frame time. We do this plumbing to avoid making lots of calls to query the system time, which is expensive. The compositor has a similar optimization; see https://code.google.com/p/chromium/codesearch#chromium/src/cc/layers/picture_layer_impl.cc&sq=package:chromium&l=452 for example. BUG= 605701 Review URL: https://codereview.chromium.org/1911273002 Cr-Commit-Position: refs/heads/master@{#389394} [modify] https://crrev.com/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40/third_party/WebKit/Source/core/layout/ImageQualityController.cpp [modify] https://crrev.com/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40/third_party/WebKit/Source/core/layout/ImageQualityController.h [modify] https://crrev.com/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40/third_party/WebKit/Source/core/layout/ImageQualityControllerTest.cpp [modify] https://crrev.com/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40/third_party/WebKit/Source/core/page/ChromeClient.h [modify] https://crrev.com/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40/third_party/WebKit/Source/web/ChromeClientImpl.cpp [modify] https://crrev.com/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40/third_party/WebKit/Source/web/ChromeClientImpl.h [modify] https://crrev.com/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40/third_party/WebKit/Source/web/WebViewImpl.cpp [modify] https://crrev.com/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40/third_party/WebKit/Source/web/WebViewImpl.h [modify] https://crrev.com/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40/third_party/WebKit/public/web/WebWidget.h
,
Apr 24 2016
,
Apr 25 2016
,
Apr 25 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40 commit f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40 Author: chrishtr <chrishtr@chromium.org> Date: Sun Apr 24 00:02:33 2016 Don't restart the ImageQualityController timer unless it is already half over. Restarting the timer every time an image continues to animate is very expensive, because there is no way to actuually cancel the existing timer. Instead, the timer is neutered, so that when it fires it will do nothing. This results in a flood of no-op timer callbacks in the referenced bug scenario. Instead, only restart the timer if the current frame time is more than half of the timer time later than the frame time at the start of the timer. To accomplish that, record the current frame time in WebViewImpl, so that it can be compared with a future frame time. We do this plumbing to avoid making lots of calls to query the system time, which is expensive. The compositor has a similar optimization; see https://code.google.com/p/chromium/codesearch#chromium/src/cc/layers/picture_layer_impl.cc&sq=package:chromium&l=452 for example. BUG= 605701 Review URL: https://codereview.chromium.org/1911273002 Cr-Commit-Position: refs/heads/master@{#389394} [modify] https://crrev.com/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40/third_party/WebKit/Source/core/layout/ImageQualityController.cpp [modify] https://crrev.com/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40/third_party/WebKit/Source/core/layout/ImageQualityController.h [modify] https://crrev.com/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40/third_party/WebKit/Source/core/layout/ImageQualityControllerTest.cpp [modify] https://crrev.com/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40/third_party/WebKit/Source/core/page/ChromeClient.h [modify] https://crrev.com/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40/third_party/WebKit/Source/web/ChromeClientImpl.cpp [modify] https://crrev.com/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40/third_party/WebKit/Source/web/ChromeClientImpl.h [modify] https://crrev.com/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40/third_party/WebKit/Source/web/WebViewImpl.cpp [modify] https://crrev.com/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40/third_party/WebKit/Source/web/WebViewImpl.h [modify] https://crrev.com/f79f4d6a1c52efbe06e30ace1ce882ac1d53aa40/third_party/WebKit/public/web/WebWidget.h |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by esprehn@chromium.org
, Apr 21 2016