Like most desktop applications, Firefox is driven by an event loop. Currently this event loop is servicing a lot of events including page layout, drawing, image decoding and don’t forget JS. We do our best to handle events quickly (in a few milliseconds) and break up the ones that we know will take longer (such as image decoding). Any event, such as poorly written JS, that takes too long to proces
![Off Main Thread Compositing (OMTC) and why it matters](https://cdn-ak-scissors.b.st-hatena.com/image/square/6dcdd2ca670ea3653f734968823ddd32a85845a3/height=288;version=1;width=512/https%3A%2F%2Fbenoitgirard.wordpress.com%2Fwp-content%2Fuploads%2F2012%2F05%2Fpaint-main-thread.png)