3 ms·
Because it was not coded with performance in mind. It updates the position left and top properties forcing the browser to re-render on each frame. What it shoul
by tiborsaas 7y ago
Because it was not coded with performance in mind. It updates the position left and top properties forcing the browser to re-render on each frame. What it should be doing is use CSS transforms so that only the GPU would be doing the updates.
Or use canvas and this won't be a matter of DOM manipulation.