← Back to release summary

Intervention: Throttle timers in out-of-view frames

Category
Performance
Type
New or changed feature
Status
Browser Intervention (Chrome 57)
Intent stage
None

Summary

As an intervention we want to limit the rate at which timers in out-of-view, cross-origin frames are able to fire. Until very recently it wasn't possible for script authors to easily determine whether their content was visible to the user or not. A common pattern therefore is to use a continuous setTimeout() loop for driving animations without considering visibility, which can be very costly for performance.

Standards & signals

Docs: https://docs.google.com/document/d/1Xa8sd2M_Eh6hGSWeKTy_akzKdxcVZjCk4PQMqV8yXXw/edit https://github.com/WICG/interventions/issues/9

Samples: http://fiddle.jshell.net/3L9c9uyc/3/show/light/

View on chromestatus.com