Arction / lcjs-showcase-audio

Audio visualization using LightningChart
https://arction.github.io/lcjs-showcase-audio/
7 stars 2 forks source link

Why does the waveform freeze every once in a while? #5

Open ChouJoe opened 3 years ago

ChouJoe commented 3 years ago

i find a common issue in this demo and others realtime demos in lightningchart website :the waveform will have a short freeze moment every once in a while, is it a BUG or what can we do to fix this issue?

Snekw commented 3 years ago

The small freezes that happen are caused by JS garbage collector. In the real time demos there is often large amounts of data that is generated and used for a short period of time and then left for the garbage collector to collect. This kind of data coming in and going out fast easily results in this kind of short freezing and often can't be completely eliminated.

We are aware of the freezing and we are continuously improving the library memory usage and reducing how much data is left for garbage collector in the hopes of reducing how often the garbage collector needs to run.

ChouJoe commented 3 years ago

The small freezes that happen are caused by JS garbage collector. In the real time demos there is often large amounts of data that is generated and used for a short period of time and then left for the garbage collector to collect. This kind of data coming in and going out fast easily results in this kind of short freezing and often can't be completely eliminated.

We are aware of the freezing and we are continuously improving the library memory usage and reducing how much data is left for garbage collector in the hopes of reducing how often the garbage collector needs to run.

thank you for your answer sincerely,since there is a JS garbage problem when we add large amounts of data to the series(lightningchart), I was wondering if there is another way to achieve real-time waveform?