Re:Don't Animate Height
by dotancohen on Tuesday July 22, 2025 @11:32PM
(#44655491)
That's a fix for a webdev who cares, not a fix for a browser vendor as GP was alluding to.
[ Parent
| on HN ]
Re:Don't Animate Height
by fiddlerwoaroof on Tuesday July 22, 2025 @11:52PM
(#44655584)
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.
It 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.
Browsers 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.