New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 653352 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

Idle callback deadline doesn't reduce when there's pending user input

Project Member Reported by esprehn@chromium.org, Oct 6 2016

Issue description

https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/dom/IdleDeadline.cpp?sq=package:chromium&rcl=1475695348&l=12

If you're using requestIdleCallback and the system tells you that the deadline is 50ms in the future, and then there's a user input (ex. a keystroke) we don't reduce the deadline time making timeRemaining return 0, so user code cannot early abort like the parser does with something like shouldYieldForHighPriorityWork().

While I think this does technically match rail with a maximum of 50ms delay, it could be better where idle work aborts immediately to handle user input so key strokes aren't delayed and future idle tasks can drop from long time (50ms) to short time (8ms).
 

Comment 1 by dbeam@chromium.org, Oct 6 2016

Cc: egarciad@chromium.org
Cc: rmcilroy@chromium.org
Hmm, I suppose we could make timeRemaining() check shouldYieldForHighPriorityWork() and return zero when needed.
The spec certainly allows us to do this (I had it in the back of my head that it might be worth doing something like this when writing the spec). I'd be happy with us modifying timeRemaining() check shouldYieldForHighPriorityWork() and drop down to zero when there is a pending interaction.
Owner: skyos...@chromium.org
Status: Started (was: Untriaged)
Status: Fixed (was: Started)

Sign in to add a comment