I’ve got some code that currently sets -webkit-transform far more often than it needs to. Optimizing this to only set the CSS value only when it changes is possible, but I’d hate to go through that work if the browser is already doing this.
What I’d like to know is: is re-setting this property to the same value over and over expensive, or does WebKit have some internal logic to optimize the path where you set the same value multiple times?
I’d be willing to wager that “expensive” is still measured in 1s of milliseconds (or less) – so not really that expensive in the context of a 500ms page load time. I suspect optimizing like that won’t make the site any faster in anything except the most pedantic benchmarks (if that)