Open jaehyeokjeong opened 2 years ago
You have to apply a limitation on your storing data. For example, you can keep only 100 last items and remove old data from your stored data, and show it. That's the way.
Check out our realtime sin/cos chart:
When more than 100 data are filled through the removeAt(0) method, the data is managed by erasing the 0th index. After running the line chart for approximately two days, the application stopped.(Memory: 3.3 gigabytes) As a result of checking through flutter dev tools, the starting memory was about 250 megabytes, but when the app stopped, it went up to 3 gigabytes.
try adding the animation to the chart -> for example
LineChart( mainData(), duration: firsTime ? const Duration(milliseconds: 200) : const Duration(seconds: 0), curve: Curves.linear, ),
Hi. Bluetooth receives real-time data(100Hz) and outputs graphs through a line graph library(LineChart). The UI will update normally for about 10 minutes, but the UI will start blinking little by little and start to deteriorate (the graph will disappear and reappear after about 3 hours). I wonder if this problem is a memory leak or if it is improved by modifying other hyperparameters.