2 ms·
Element manipulation is normally slow because of layout computations, but explicit transforms remove the element from the layout flow (it doesn't affect nor get
by _bxg1 7y ago
Element manipulation is normally slow because of layout computations, but explicit transforms remove the element from the layout flow (it doesn't affect nor get affected by the sizing and content of other elements), cutting nearly all of that cost. Also, in most browsers explicit transforms get computed on the GPU.
So for this type of case there isn't nearly as much going on between the DOM and the raw graphics code as you might think