Revert of Throttle resource message requests during user interaction (patchset #14...
commit0b0860a692e9d327f4f76949d096a7f2b1687c7c
authordcheng <dcheng@chromium.org>
Thu, 5 Feb 2015 04:40:12 +0000 (4 20:40 -0800)
committerCommit bot <commit-bot@chromium.org>
Thu, 5 Feb 2015 04:41:00 +0000 (5 04:41 +0000)
treef4aee2bab8294ecad83a13aa564da604c5b84584
parentdde147af5c871066747dc10d683816b134bb920f
Revert of Throttle resource message requests during user interaction (patchset #14 id:300001 of https://codereview.chromium.org/847883002/)

Reason for revert:
The new DCHECKs for CalledOnValidThread are breaking tests everywhere:
https://build.chromium.org/p/chromium.webkit/builders/Linux%20ChromiumOS%20Tests%20%28dbg%29%281%29/builds/6021

Original issue's description:
> Throttle resource message requests during user interaction
>
> Resource message requests can be relatively expensive, particularly in
> the induced work on the browser IO thread. Currently, there is no bound
> on the rate with which such requests are dispatched from the renderer.
> This leads to situations where the browser IO thread is flooded with
> requests, potentially causing scroll jank and otherwise undesirable
> stalls in the browser pipeline.
>
> Introduce a ResourceMessageThrottler which intercepts and defers a given
> resource message stream, depending on the state of the RendererScheduler.
> When the RendererScheduler indicates that high priority work is
> imminent/likely, requests will be throttled according to a configurable
> dispatch rate.
>
> Hook this throttling mechanism up to the ResourceDispatcher, limiting
> the number of resource message requests/second during user interaction
> to 180 (3 per frame at 60 fps) on Android, and 480 on desktop.
>
> See goo.gl/H42AgQ for more design details.
>
> BUG=440037,402136
>
> Committed: https://crrev.com/acfb4199abf841a1577c3968579c43b0232a53b7
> Cr-Commit-Position: refs/heads/master@{#314739}

TBR=alexclarke@chromium.org,picksi@chromium.org,skyostil@chromium.org,rmcilroy@chromium.org,davidben@chromium.org,jdduke@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=440037,402136

Review URL: https://codereview.chromium.org/897223002

Cr-Commit-Position: refs/heads/master@{#314755}
16 files changed:
content/child/resource_dispatcher.h
content/content_renderer.gypi
content/content_tests.gypi
content/renderer/render_thread_impl.cc
content/renderer/render_thread_impl.h
content/renderer/scheduler/null_renderer_scheduler.cc
content/renderer/scheduler/null_renderer_scheduler.h
content/renderer/scheduler/renderer_scheduler.h
content/renderer/scheduler/renderer_scheduler_impl.cc
content/renderer/scheduler/renderer_scheduler_impl.h
content/renderer/scheduler/renderer_scheduler_impl_unittest.cc
content/renderer/scheduler/resource_dispatch_throttler.cc [deleted file]
content/renderer/scheduler/resource_dispatch_throttler.h [deleted file]
content/renderer/scheduler/resource_dispatch_throttler_unittest.cc [deleted file]
content/test/fake_renderer_scheduler.cc
content/test/fake_renderer_scheduler.h