4 ms·
While I generally agree, even in a hardware accelerated world will-change can still be useful. If you're transforming a complex box with lots of typeset interna
by kevingadd 5y ago
While I generally agree, even in a hardware accelerated world will-change can still be useful. If you're transforming a complex box with lots of typeset international text and stuff in it, it can be necessary to buffer that whole box to a scratch surface first, so will-change is useful to optimize that.
- chrismorgan 5y agoBut does will-change do that? I would think what you describe would be a pessimisation in many (perhaps most) cases. (I haven’t the foggiest idea and my guess is wild rather than educated. I would like to be informed.)
- kevingadd 5y agoIt's a hint, so it has no (afaik) spec-required behavior. Whether it does that is up to the browser vendor and could depend on your device configuration. The MDN guidance says not to use it unless absolutely necessary, which I agree with - but it was added to solve a real problem on certain browser engines (and the problem can be way worse on mobile.)