PerfTerminology

From MozillaWiki
Jump to: navigation, search

Terminology

Main Thread 
A browser generally runs all its things sequentially on a single thread, which is typically referred to as the main thread. This means that Javascript can change stuff which affects the screen, and Javascript code will not continue before the screen reflects the requested changes, or other changes. This is a big bottleneck since it's hard to run things in parallel.
v-sync 
Vertical synchronization to the monitor's beam reset. It's used at contexts of animations, where in order to achieve 100% smoothness of animation, each frame should be sent to the display such that it matches the v-sync timing.
OMTC 
Off main thread composition. When rendering graphics in Firefox, this means that the main thread just prepares the rendering for each frame, but then a heavy chunk of the rendering (composition) happens on a different thread. This allows to have more free time on the main thread, which in turn means it can run more Javascript stuff on each frame. BenWa's blog post explains OMTC in details.
APZ 
Async Pan Zoom (Controller) - technique which browsers sometimes use to zoom and/or pan (move the page up/down/left/right) on a thread which isn't the main thread, therefore allowing longer Javascript calculations on the main thread without affecting the responsiveness for certain operations (specifically - pan and zoom).
Project Silk 
Project to unify and improve animation in Firefox by using global v-sync timing. Before silk, the timing was done at the "refresh driver" using timeouts, where on each such iteration it would run everything the browser needs to run for a single frame. With silk, there's an external module which generates events synchronized to v-sync, which hopefully improves animation smoothness. Check this mchang's blog post for an overview of Project Silk and this document for Project Silk architecture.