T(Fast)LineSeries performance issue on Android
Posted: Tue Mar 21, 2017 1:23 pm
Hi,
I think I'm experiencing a serious issue with the TLineSeries/TFastLineSeries running on Android.
Using Delphi 10.2 Upd 2 and Steema TChart V2016.19.161025.
I've put together, and attached, a stripped down multi device demo project demonstrating the issue.
What I'm trying to achieve is the following:
- Running graph (yes still ) receiving 22 data samples per sec = Update Chart approx every 40 millisec (1s = 1000ms -> 1000/22 ~ 45ms)
- Display up to 2 minutes of data = 22 * 60 = 1320 point in Series, but hold up to 1 hour (79200 data samples).
In my demo project a separate thread feeds the chart (Main thread) every 40ms with a random datavalue [0..100]
In the Main thread (or application); datavalue is consumed, chart scrolled accordingly, and a label*** is updated to show the performance of the thread.
***The label is updated with number of milliseconds since the chart (In main thread) was last updated. The expected value would be 40 ms.
Running my multi device demo app on Windows: The Value is, as expected, 40ms. I can even add thousands of more samples to the series, and the app still performs just fine, updating at 40 ms.
BUT; doing the same on Android (same code of course); the app can only handle about 500 (!!!) data samples before the performance decreases noticeably. At a 1000 data samples the chart will only manage to be updated (draw/scrolled/data added) every 70ms. And it just gets worse as more points are added.
At 2000 data samples it's every 110 ms
At 5000 data samples it's every 230 ms
At 10000 data samples it's every 400 ms (!!!!)
I was hoping it was my coding that caused the issues I'm having, but after a lot of testing and debugging I think it's TChart. Please tell me if I'm wrong
I really hope you have time to address this as it is a showstopper for the release of our software. ....and you know, It's me they're "beating"
Other than that the app is coming along great and could not have done with out it.
Thanks in advance
Regards,
Leo
I think I'm experiencing a serious issue with the TLineSeries/TFastLineSeries running on Android.
Using Delphi 10.2 Upd 2 and Steema TChart V2016.19.161025.
I've put together, and attached, a stripped down multi device demo project demonstrating the issue.
What I'm trying to achieve is the following:
- Running graph (yes still ) receiving 22 data samples per sec = Update Chart approx every 40 millisec (1s = 1000ms -> 1000/22 ~ 45ms)
- Display up to 2 minutes of data = 22 * 60 = 1320 point in Series, but hold up to 1 hour (79200 data samples).
In my demo project a separate thread feeds the chart (Main thread) every 40ms with a random datavalue [0..100]
In the Main thread (or application); datavalue is consumed, chart scrolled accordingly, and a label*** is updated to show the performance of the thread.
***The label is updated with number of milliseconds since the chart (In main thread) was last updated. The expected value would be 40 ms.
Running my multi device demo app on Windows: The Value is, as expected, 40ms. I can even add thousands of more samples to the series, and the app still performs just fine, updating at 40 ms.
BUT; doing the same on Android (same code of course); the app can only handle about 500 (!!!) data samples before the performance decreases noticeably. At a 1000 data samples the chart will only manage to be updated (draw/scrolled/data added) every 70ms. And it just gets worse as more points are added.
At 2000 data samples it's every 110 ms
At 5000 data samples it's every 230 ms
At 10000 data samples it's every 400 ms (!!!!)
I was hoping it was my coding that caused the issues I'm having, but after a lot of testing and debugging I think it's TChart. Please tell me if I'm wrong
I really hope you have time to address this as it is a showstopper for the release of our software. ....and you know, It's me they're "beating"
Other than that the app is coming along great and could not have done with out it.
Thanks in advance
Regards,
Leo