mmontag / chip-player-js

Web-based music player for a variety of video game and chiptune music formats.
https://chiptune.app
GNU General Public License v3.0
324 stars 17 forks source link

Update TimeSlider outside of React #108

Open mmontag opened 2 years ago

mmontag commented 2 years ago

The TimeSlider updates about 20 times per second. Since it uses React setState, this means a constant churn of React objects, on the order of 850 KB per second or 40 KB per update.

This also could mean some overhead from unnecessary DOM listeners, layout, and rendering events, as compared to doing this with raw DOM manipulation.

image