4 ms·
The visibility stuff is good. They forgot to mention that when the tab is hidden or not currently focused, the browser doesn’t fire requestAnimationFrames becau
by nojvek 7y ago
The visibility stuff is good. They forgot to mention that when the tab is hidden or not currently focused, the browser doesn’t fire requestAnimationFrames because it’s good for battery life.
Also he lost me at don’t measure layout and paint. That’s like the #1 reason why UI is slow. Layout and paint is a very compute intensive task. Deffo you should measure both but you can get huge gains by optimizing how many dom nodes browser has to deal with so layout and paint is efficient.
V8 won’t bat an eye to go through a million items in an array and do a filter map operation on them. Rendering a million things in a browser is a different ball game.
I’ve spent many years of my life optimizing UI perf. I have to give the Chrome devtools team massive kudos for building a great performance analyzing tool.