XY chart update speed

For general Flowcode discussion that does not belong in the other sections.
Steve-Matrix
Matrix Staff
Posts: 1465
http://meble-kuchenne.info.pl
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 204 times
Been thanked: 347 times

Re: XY chart update speed

Post by Steve-Matrix »

I have been experimenting with the charting of Flowcode versions v9.0, v9.1 and v9.2 on a fresh PC and I have some results. I have attached my test program which stresses the chart.

In terms of speed, v9.2 for this program is actually a bit slower than v9.0 and v9.1. So apologies :oops: . I assume the speed increases I was seeing relate to specific test programs in debug situations. I definitely remember such speed increases, but I think it may have been because I originally put effort into improving stability (at the cost of speed) before I then improved the speed. I will amend my announcement topic to make this clear.

And thanks to Janez for the post which prompted me investigate this further.

In terms of speed, plotting 10000 points takes around 1s for v9.0 and 1.4s for v9.2. V9.1 is actually faster than both at plotting, but is very unstable when plotting without pausing and crashes often.

In terms of stability, v9.0 crashes occasionally (especially if the panel is moved or interacted with by the mouse), v9.1 crashes within minutes of running, but v9.2 has not crashed for me so far (after hours of experimentation).

PC resource use is much improved in v9.2. CPU usage is slightly lower and memory usage is much lower than v9.0, although GPU usage is higher:

PC resource usage.png
PC resource usage.png (15.35 KiB) Viewed 4467 times

So in summary, the XY chart in V9.2 is not necessarily faster but it is much more stable and less resource-intensive.

And my original reply does stand. There are better dedicated graphing applications and Flowcode's graphing capabilities are only a small part its functionality.
Attachments
xy chart speed increase test.fcfx
(17.65 KiB) Downloaded 359 times

svislartelekom
Posts: 7
Joined: Fri Dec 11, 2020 11:03 pm
Been thanked: 1 time

Re: XY chart update speed

Post by svislartelekom »

Dear Steve,

Please don't nderstand me wrong.
Flowcode is an excellent tool, but for measurements, xygraph (oscilloscope like..) is too slow.
What I mean is that I don't understand, why it is not so fast as usualy graph software written in C is.
Python which I use is described as a slow one in this case too, but Pyqtgraph is fast enough for me.
I am not a good programmer, but I think XYgraph should even work faster than Pyqtgraph.
The problem that I have is that I can't make everything in Flowcode becouse of it. I can make software for microprocessor, but I can't make UI with graph.
I would like to make a whole system in flowcode.

Best regards,
Janez

svislartelekom
Posts: 7
Joined: Fri Dec 11, 2020 11:03 pm
Been thanked: 1 time

Re: XY chart update speed

Post by svislartelekom »

Hi Steve,

Thanks for an update.
You wrote it while I was writting mine... :)
Regarding stability - you are right.

I will make test with your design on my (old) pc and let you know.

Best regards,
Janez

stefan.erni
Valued Contributor
Posts: 997
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 190 times
Been thanked: 217 times

Re: XY chart update speed

Post by stefan.erni »

Hi Steve, Hi Janez

The XY chart looks good. Ok faster would be better.

In my App I receive 512 values (16bit integer) via Bluetooth.
This I save in a buffer.

There is a SetMode command from the chart to choose using a buffer.
How can i use this hidden buffer ?

Is there a way to use integer instead of float in future?

regards

Stefan
buffer_2021-08-02_17-28-01.png
buffer_2021-08-02_17-28-01.png (33.44 KiB) Viewed 4444 times

Steve-Matrix
Matrix Staff
Posts: 1465
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 204 times
Been thanked: 347 times

Re: XY chart update speed

Post by Steve-Matrix »

stefan.erni wrote:
Mon Aug 02, 2021 5:02 pm
There is a SetMode command from the chart to choose using a buffer.
How can i use this hidden buffer ?
I can't quite remember, and can't check because I'm away from my PC. But I think the SetMode might not provide a benefit from v9.2, so I would not recommend using it.
stefan.erni wrote:
Mon Aug 02, 2021 5:02 pm
Is there a way to use integer instead of float in future?
You do not need to convert to a float when passing a plot value. Just pass an integer value instead and it will be converted to a float automatically. Internally, floats need to be used, so there would be no speed benefit in creating integer-only functions.

stefan.erni
Valued Contributor
Posts: 997
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 190 times
Been thanked: 217 times

Re: XY chart update speed

Post by stefan.erni »

Hi Steve, Hi Janez

Yes it's working fine with float, even if I don't convert the integer before.
I add ECG simualation data to my test-app so you can see how it works without hardware.
I found out, that if the data is in the chart, you can manipulate the chart extremely fast. So rolling the chart works fine for me.
The App shows 10 times a signal and shows the min and max updatetime from the chart and it shows a scrolling chart. The App start and stop automatic.
regards

Stefan

in the zip are FC9 App and a deploit version
Post-it.zip
(1.26 MiB) Downloaded 394 times
ecg_2021-08-06_11-33-30.png
ecg_2021-08-06_11-33-30.png (83.56 KiB) Viewed 4421 times

Post Reply