Discussion:
[chromium-bugs] Re: Issue 440037 in chromium: Cookie-related work can be slow on the IO thread
c***@googlecode.com
2014-12-08 19:43:05 UTC
Permalink
Comment #10 on issue 440037 by ***@chromium.org: Cookie-related work
can be slow on the IO thread
https://code.google.com/p/chromium/issues/detail?id=440037

We are, IIUC, responding to an IPC request originating when Javascript
queries document.cookies.

I honestly have no idea whether .4-.5ms is excessive. I haven't looked
closely at IPC or JS overhead in a long time. Is .4-.5ms meaningful in
comparison?

There is, no doubt, room for optimization. But I'm not sure it's worth
investigating further if there is no evidence of a downstream impact.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-12-08 19:48:05 UTC
Permalink
Comment #11 on issue 440037 by ***@chromium.org: Cookie-related work
can be slow on the IO thread
https://code.google.com/p/chromium/issues/detail?id=440037

To be clear, the reference to ViewHostMsg_GetCookies is not related to the
original image, right?

AFAICT, the image shows the initiation of an HTTP request, which is not in
response to ViewHostMsg_GetCookies.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2014-12-08 19:55:05 UTC
Permalink
Comment #12 on issue 440037 by ***@chromium.org: Cookie-related work can
be slow on the IO thread
https://code.google.com/p/chromium/issues/detail?id=440037

Right, the image doesn't show it, but the attached trace shows a good
number of ViewHostMsg_GetCookies instances interspersed with the scroll
sequence.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2015-02-05 04:16:38 UTC
Permalink
Comment #14 on issue 440037 by ***@chromium.org: Cookie-related work
can be slow on the IO thread
https://code.google.com/p/chromium/issues/detail?id=440037#c14

The following revision refers to this bug:

https://chromium.googlesource.com/chromium/src.git/+/acfb4199abf841a1577c3968579c43b0232a53b7

commit acfb4199abf841a1577c3968579c43b0232a53b7
Author: jdduke <***@chromium.org>
Date: Thu Feb 05 03:47:15 2015

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

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

Cr-Commit-Position: refs/heads/master@{#314739}

[modify]
http://crrev.com/acfb4199abf841a1577c3968579c43b0232a53b7/content/child/resource_dispatcher.h
[modify]
http://crrev.com/acfb4199abf841a1577c3968579c43b0232a53b7/content/content_renderer.gypi
[modify]
http://crrev.com/acfb4199abf841a1577c3968579c43b0232a53b7/content/content_tests.gypi
[modify]
http://crrev.com/acfb4199abf841a1577c3968579c43b0232a53b7/content/renderer/render_thread_impl.cc
[modify]
http://crrev.com/acfb4199abf841a1577c3968579c43b0232a53b7/content/renderer/render_thread_impl.h
[modify]
http://crrev.com/acfb4199abf841a1577c3968579c43b0232a53b7/content/renderer/scheduler/null_renderer_scheduler.cc
[modify]
http://crrev.com/acfb4199abf841a1577c3968579c43b0232a53b7/content/renderer/scheduler/null_renderer_scheduler.h
[modify]
http://crrev.com/acfb4199abf841a1577c3968579c43b0232a53b7/content/renderer/scheduler/renderer_scheduler.h
[modify]
http://crrev.com/acfb4199abf841a1577c3968579c43b0232a53b7/content/renderer/scheduler/renderer_scheduler_impl.cc
[modify]
http://crrev.com/acfb4199abf841a1577c3968579c43b0232a53b7/content/renderer/scheduler/renderer_scheduler_impl.h
[modify]
http://crrev.com/acfb4199abf841a1577c3968579c43b0232a53b7/content/renderer/scheduler/renderer_scheduler_impl_unittest.cc
[add]
http://crrev.com/acfb4199abf841a1577c3968579c43b0232a53b7/content/renderer/scheduler/resource_dispatch_throttler.cc
[add]
http://crrev.com/acfb4199abf841a1577c3968579c43b0232a53b7/content/renderer/scheduler/resource_dispatch_throttler.h
[add]
http://crrev.com/acfb4199abf841a1577c3968579c43b0232a53b7/content/renderer/scheduler/resource_dispatch_throttler_unittest.cc
[modify]
http://crrev.com/acfb4199abf841a1577c3968579c43b0232a53b7/content/test/fake_renderer_scheduler.cc
[modify]
http://crrev.com/acfb4199abf841a1577c3968579c43b0232a53b7/content/test/fake_renderer_scheduler.h
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2015-02-05 05:05:38 UTC
Permalink
Comment #15 on issue 440037 by ***@chromium.org: Cookie-related work
can be slow on the IO thread
https://code.google.com/p/chromium/issues/detail?id=440037#c15

The following revision refers to this bug:

https://chromium.googlesource.com/chromium/src.git/+/0b0860a692e9d327f4f76949d096a7f2b1687c7c

commit 0b0860a692e9d327f4f76949d096a7f2b1687c7c
Author: dcheng <***@chromium.org>
Date: Thu Feb 05 04:40:12 2015

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
Post by c***@googlecode.com
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
TBR=***@chromium.org,***@chromium.org,***@chromium.org,***@chromium.org,***@chromium.org,***@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}

[modify]
http://crrev.com/0b0860a692e9d327f4f76949d096a7f2b1687c7c/content/child/resource_dispatcher.h
[modify]
http://crrev.com/0b0860a692e9d327f4f76949d096a7f2b1687c7c/content/content_renderer.gypi
[modify]
http://crrev.com/0b0860a692e9d327f4f76949d096a7f2b1687c7c/content/content_tests.gypi
[modify]
http://crrev.com/0b0860a692e9d327f4f76949d096a7f2b1687c7c/content/renderer/render_thread_impl.cc
[modify]
http://crrev.com/0b0860a692e9d327f4f76949d096a7f2b1687c7c/content/renderer/render_thread_impl.h
[modify]
http://crrev.com/0b0860a692e9d327f4f76949d096a7f2b1687c7c/content/renderer/scheduler/null_renderer_scheduler.cc
[modify]
http://crrev.com/0b0860a692e9d327f4f76949d096a7f2b1687c7c/content/renderer/scheduler/null_renderer_scheduler.h
[modify]
http://crrev.com/0b0860a692e9d327f4f76949d096a7f2b1687c7c/content/renderer/scheduler/renderer_scheduler.h
[modify]
http://crrev.com/0b0860a692e9d327f4f76949d096a7f2b1687c7c/content/renderer/scheduler/renderer_scheduler_impl.cc
[modify]
http://crrev.com/0b0860a692e9d327f4f76949d096a7f2b1687c7c/content/renderer/scheduler/renderer_scheduler_impl.h
[modify]
http://crrev.com/0b0860a692e9d327f4f76949d096a7f2b1687c7c/content/renderer/scheduler/renderer_scheduler_impl_unittest.cc
[delete]
http://crrev.com/dde147af5c871066747dc10d683816b134bb920f/content/renderer/scheduler/resource_dispatch_throttler.cc
[delete]
http://crrev.com/dde147af5c871066747dc10d683816b134bb920f/content/renderer/scheduler/resource_dispatch_throttler.h
[delete]
http://crrev.com/dde147af5c871066747dc10d683816b134bb920f/content/renderer/scheduler/resource_dispatch_throttler_unittest.cc
[modify]
http://crrev.com/0b0860a692e9d327f4f76949d096a7f2b1687c7c/content/test/fake_renderer_scheduler.cc
[modify]
http://crrev.com/0b0860a692e9d327f4f76949d096a7f2b1687c7c/content/test/fake_renderer_scheduler.h
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
c***@googlecode.com
2015-02-05 06:36:38 UTC
Permalink
Comment #16 on issue 440037 by ***@chromium.org: Cookie-related work
can be slow on the IO thread
https://code.google.com/p/chromium/issues/detail?id=440037#c16

The following revision refers to this bug:

https://chromium.googlesource.com/chromium/src.git/+/94ae1f37922badae0012395018c23342f33d13b7

commit 94ae1f37922badae0012395018c23342f33d13b7
Author: jdduke <***@chromium.org>
Date: Thu Feb 05 06:27:13 2015

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.

Note: This change originally landed in
https://crrev.com/acfb4199abf841a1577c3968579c43b0232a53b7, but was
reverted due to issues with enforced ThreadChecker validation in
RendererSchedulerImpl. The ThreadChecker validation fix has been split
into a separate patch.

BUG=440037,402136

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

Cr-Commit-Position: refs/heads/master@{#314767}

[modify]
http://crrev.com/94ae1f37922badae0012395018c23342f33d13b7/content/child/resource_dispatcher.h
[modify]
http://crrev.com/94ae1f37922badae0012395018c23342f33d13b7/content/content_renderer.gypi
[modify]
http://crrev.com/94ae1f37922badae0012395018c23342f33d13b7/content/content_tests.gypi
[modify]
http://crrev.com/94ae1f37922badae0012395018c23342f33d13b7/content/renderer/render_thread_impl.cc
[modify]
http://crrev.com/94ae1f37922badae0012395018c23342f33d13b7/content/renderer/render_thread_impl.h
[modify]
http://crrev.com/94ae1f37922badae0012395018c23342f33d13b7/content/renderer/scheduler/null_renderer_scheduler.cc
[modify]
http://crrev.com/94ae1f37922badae0012395018c23342f33d13b7/content/renderer/scheduler/null_renderer_scheduler.h
[modify]
http://crrev.com/94ae1f37922badae0012395018c23342f33d13b7/content/renderer/scheduler/renderer_scheduler.h
[modify]
http://crrev.com/94ae1f37922badae0012395018c23342f33d13b7/content/renderer/scheduler/renderer_scheduler_impl.cc
[modify]
http://crrev.com/94ae1f37922badae0012395018c23342f33d13b7/content/renderer/scheduler/renderer_scheduler_impl.h
[modify]
http://crrev.com/94ae1f37922badae0012395018c23342f33d13b7/content/renderer/scheduler/renderer_scheduler_impl_unittest.cc
[add]
http://crrev.com/94ae1f37922badae0012395018c23342f33d13b7/content/renderer/scheduler/resource_dispatch_throttler.cc
[add]
http://crrev.com/94ae1f37922badae0012395018c23342f33d13b7/content/renderer/scheduler/resource_dispatch_throttler.h
[add]
http://crrev.com/94ae1f37922badae0012395018c23342f33d13b7/content/renderer/scheduler/resource_dispatch_throttler_unittest.cc
[modify]
http://crrev.com/94ae1f37922badae0012395018c23342f33d13b7/content/test/fake_renderer_scheduler.cc
[modify]
http://crrev.com/94ae1f37922badae0012395018c23342f33d13b7/content/test/fake_renderer_scheduler.h
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/a/chromium.org/group/chromium-bugs

To unsubscribe from this group and stop receiving emails from it, send an email to chromium-bugs+***@chromium.org.
Loading...