XY chart update speed

For general Flowcode discussion that does not belong in the other sections.
svislartelekom
Posts: 7
http://meble-kuchenne.info.pl
Joined: Fri Dec 11, 2020 11:03 pm
Been thanked: 1 time

XY chart update speed

Post by svislartelekom »

Hi,

I found new Charts feature very interesting, only when I made a simple program to check the update speed I found it working very slow. If I deploy it as an app, it works even slower.
On my computer it needs approx. 300 ms for one update of 500 points, for example in Python (which is slow), I can get more then 100 updates of 5000 points in a second (same math function).
I attach the test file. Can somebody check if I am doing something wrong or this is how it works.

Regards,
Janez
Attachments
XYgraph_3.zip
(4.32 KiB) Downloaded 775 times

Steve-Matrix
Matrix Staff
Posts: 1509
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 211 times
Been thanked: 350 times

Re: XY chart update speed

Post by Steve-Matrix »

Thanks for the post. The chart components are all based on a common base which works in a particular way. Each point in the graph has additional functionality to support all chart types which essentially slows down the X-Y chart (because internally each point is much more than a coordinate).

There is a mode for the X-Y chart which does improve speed. Use the "SetMode" function to "true" near the beginning of your program. This tells the "AddPoint" macro to write the data to an internal buffer rather than directly onto the chart. Then, once all data points have been added, call "RefreshChart" to display the data. This should speed up the display.

Note also we are in the process of developing a new X-Y chart which is not based on the common base. This will be a lot faster, and we hope to have this available in the next few months.

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,

Thank you for your reply.
I already tested the mode which collects points in buffer and updates all data at once, but I didn't find any improvement in speed so I sent the fastest version I made, for test.

Regarding the new x-y chart, I would suggest you to add an oscilloscope-like chart with very fast updates. Fast updates are necessary for real time measurements.
I hope new chart will be avalable soon.

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 »

Dear Steve,

Is there something new about new - faster XY Graph?

Best regards,
Janez

Steve-Matrix
Matrix Staff
Posts: 1509
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 211 times
Been thanked: 350 times

Re: XY chart update speed

Post by Steve-Matrix »

Hi Janez,

Yes - in the soon-to-be-released Flowcode v9.2, there is a significant improvement in the speed and stability of the XY Graph component. We hope this will be available later this week or perhaps next week.

jgu1
Posts: 797
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 686 times
Been thanked: 177 times

Re: XY chart update speed

Post by jgu1 »

Hi Steve!

Please announce when you release and where. Thank´s in advance. ;) :D

Br jorgen

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

Re: XY chart update speed

Post by svislartelekom »

Thanks!
I can't wait to test it.

Best regards,
Janez

Steve-Matrix
Matrix Staff
Posts: 1509
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 211 times
Been thanked: 350 times

Re: XY chart update speed

Post by Steve-Matrix »

For anyone watching this topic, the v9.2 update which includes better graphing is now available. More details can be found here:
https://www.flowcode.co.uk/forums/viewt ... ?f=3&t=569

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

Re: XY chart update speed

Post by svislartelekom »

Hi,

Sorry, but I didn't see large improvement in speed.
It takes too long to plot a simple graph like sinus.
I also tested Fourier series graphing tests by Steve.
If x is set to inc. by 1, it takes about a second to compute first 2000 points when calculating a single curve. Pyqtgraph in Python can do same function more then 100x per second.
I think this should work faster.
Or my computer is too slow for this...

Regards,
Janez

Steve-Matrix
Matrix Staff
Posts: 1509
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 211 times
Been thanked: 350 times

Re: XY chart update speed

Post by Steve-Matrix »

I'm sorry you are not seeing much improvement. The improvement in speed is between Flowcode v9.1 and V9.2, and personally I was getting a significant increase in speed (up to 8x faster, iirc).

I am sure there are dedicated graphing solutions that are faster than Flowcode, but graphing is only a small function within Flowcode. If the only thing you wish to do is plot a graph, then I agree that there are much better solutions.

Post Reply