Skip to content

Instantly share code, notes, and snippets.

@jeffreytgilbert
Created September 8, 2014 20:17
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jeffreytgilbert/1a5656bdceee396a1216 to your computer and use it in GitHub Desktop.
Save jeffreytgilbert/1a5656bdceee396a1216 to your computer and use it in GitHub Desktop.
Research notes into browser throttling behaviors

Research

Throttling and Browser Optimization

Flash Support

It is known that certain VMs can reduce the amount of FPS allowed by Flash in order to provide a more performant experience for their users. One known software is VMWare. Because we do extensive testing using SauceLabs browser grid service through selenium webdriver, we wanted to test the compatibility with real world results on specific browsers we were seeing odd results in. Below are some of the findings from this research, which resulted in our adoption of IE11 on Windows 8 and our drop of IE optimization detection on all other Windows releases.

FPS throttle detection unsupported
  • IE 8 on Windows XP
  • IE 8 on Windows 7
  • IE 9 on Windows 7
  • IE 10 on Windows 7
  • Safari 7 on OS X
  • Safari 5 on Windows XP 
  • Firefox
Tested and working
  • IE 10 on Windows 8
  • IE 11 on Windows 8.1
  • Chrome on desktops
  • Opera 15+ on desktops
Throttle event detection unsupported
  • IE 8 on Windows 7
  • IE 8 on Windows XP
  • IE 9 on Windows 7
  • IE 10 on Windows 7
  • Opera x-15 on anything
  • Safari 5 on Windows XP
  • Firefox
Tested and working
  • Safari 7 on OS X - but FPS/timer throttling isn't supported
  • IE 10 on Windows 8
  • IE 11 on Windows 8.1
  • Chrome on desktops
  • Opera 15+ on desktops
Side note for Safari on Windows

Safari 5 on Windows appears to halt all script progress until the flash handshake is completed, and it refuses to load flash at all until it is in view. It also does not have a concept of throttling flash, even though it is running Flash 14. For reference, Safari 5 on Windows 8.1 also does not support FPS or Throttling events.

Adobe claim that Windows desktop supports throttling/pausing. Perhaps, but the tests I ran are specific to throttle events and definitely do not fire in all circumstances. I've also not seen a drop in frames per second as would be expected if throttling were universally enabled. This is true for all windows instances tested under version 8, however we should be targeting more than just Windows 8 users because Windows 7 still has the vast majority of marketshare. 

Javascript Throttling Support

During the course of browser evolution and standards adoption, venders are widely known to implement specs in different incompatible ways, especially when introducing new technologies. Our research into optimizations on timer resolution and the requestAnimationFrame method allows us to grade support for techniques where we might be able to measure when an ad is being throttled by spotting performance differences even in browsers which do not conform completely to the spec, as long as we know what to look for. Below are the findings from research into the behaviors of each browser and how they differ from the expected throttling result.

Windows 8

IE 11 win 8.1 halts raf, but timers continue
avg raf: 16
avg timer: 16

Chrome on win 8.1 halts raf and timers when changing tabs
avg raf: 17
avg timer: 6

Safari 5 on win 8.1 has no concept of throttling
avg raf: 16
avg timer: 4

IE 10 win 8 halts raf, but timers continue
avg raf: 16
avg timer: 16

Windows 7

IE 10 win 7 halts raf, but timers continue
avg raf: 12
avg timer: 12

Chrome on win 7 halts raf and timers when changing tabs
avg raf: 17
avg timer: 4

IE 9 win 7 does not support raf, but throttles interval timers to 10ms when changing tabs
avg raf: 20 (guesstimated)
avg timer in tab: 0
avg timer out of tab: 10

Windows Vista

IE7 on Vista has no concept of throttling
avg raf: 20
avg timer: 10

Windows XP

Safari 5 on win XP has no concept of throttling
avg raf: 17
avg timer: 5

IE 8 on win XP has no concept of throttling
avg raf: 31
avg timer: 16

Mac OS X

Chrome on OS X halts raf and timers when changing tabs
avg raf: 17
avg timer: 4

Safari 7 on OS X halts raf and timers when changing tabs
avg raf: 17
avg timer: 4

Safari 8ish has the same results (Safari 7 + nightly webkit build)

Firefox on OS X halts raf and timers when changing tabs
avg raf: 17
avg timer: 4

Opera + blink halts raf and timers when changing tabs
avg raf: 17
avg timer: 4

Opera + presto has no concept of throttling
avg raf: 17
avg timer: 4

iOS 7

iPad iOS 7 halts both raf and timer when changing tabs
avg raf: 17
avg timer: 4 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment