Lux-Viewer-S1 icon indicating copy to clipboard operation
Lux-Viewer-S1 copied to clipboard

Visualiser slows down significantly over time

Open lpkirwin opened this issue 3 years ago • 1 comments

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:

  1. As a quick fix, should be easy to just do a hard refresh when someone hits the reset button?
  2. 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.

lpkirwin avatar Jul 01 '21 11:07 lpkirwin

thanks for pointing this out! we'll look into this.

StoneT2000 avatar Jul 02 '21 01:07 StoneT2000