3 ms·
I don't understand how you'd fix this, in general, for the browser: the browser can't just assume certain animations will never affect layout.
by fiddlerwoaroof 1y ago
I don't understand how you'd fix this, in general, for the browser: the browser can't just assume certain animations will never affect layout.
- kadoban 1y agoIt could _probably_ figure out a lot of cases via some kind of static or runtime analysis. Like the example from the linked article, there's one animation involved essentially and if the browser does the hard work for the entire length of one animation cycle and no layout ever changes, just assume it never will? It would have to have a bunch of edge cases to handle correctly I'm sure though.
- deepsun 1y agoBrowsers layout engines are pretty smart, and also optimized for speed at the same time, which makes them very complex. I can do one or the other in my code, but both is too hard. Now add there security. But Google having more people working on Chrome than on Android I would say all the low-hanging optimizations have already been optimized, and all that's left is pretty complex even for teams of thousands.