Lux-Viewer-S1
Lux-Viewer-S1 copied to clipboard
Visualiser slows down significantly over time
To reproduce:
- Load any replay
- Play it at 16x speed
- Hit the reset button (far left of the controls)
- Play it at 16x speed again
Every time you reset, the rendering slows down on the next run. For me, second replay is half the speed of the first, and it gets worse from there. You can fix it by refreshing the page or re-uploading the replay.
Two thoughts:
- As a quick fix, should be easy to just do a hard refresh when someone hits the reset button?
- I haven't looked at the code, and I'm not a JS dev, but to me this strongly suggests that there's some unnecessary data accumulating over time as successive frames are rendered (e.g. an array that always gets pushed to, never overridden or emptied). If that's true, then fixing the underlying problem should improve the performance of the visualiser quite a bit.
thanks for pointing this out! we'll look into this.