Welcome! Log In Create A New Profile

Advanced

grDraw(CHART_X) to slow/fast

Posted by rdj 
rdj
grDraw(CHART_X) to slow/fast
November 30, 2023 10:30AM
Can it be that my computer is to 'fast' or 'slow' for the grDraw functions?

Based on a query (results in an array) I fill the same Charts with new data (from the array per area) and generate these Charts so I can export it as an image.
Both charts (1x Barchart, 1x Polarchart) are on the same window.

I have already put in a wait (waitRedraw) of 1s after my grDraw

so Processes is:

BarChart
DeleteAll
AddData
BarColor
Chart.Title
Chart.Draw
waitRedraw 1s
Chart.SaveBMP

PolarArea
DeleteAll
Add CategoryLabel
AddData
Chart.Title
Chart.Draw
waitRedraw 1s
Chart SaveBMP

When I do it in debug (with hold at the point saveBMP) or with a manual confirm after each generating (so after generating I give a popup an ask do you want the next one) the correct values/titles are shown
When I let the program run as a kind of batch process (uses same code just no manual confirm after each generated set of charts) at a certain point the program doesn't update f.e. the title in time (so the title of the old chart is repeated or empty if I reset all vars before)

Used HW
Physical Machine
Intel I9 - 2,8 ghz
RAM 64 Gb
NVIDIA Quadro P400

off-course I can make my wait statement longer only when I install it on another PC it can be unnecessary
or is there a way I can optimize this in the code

kind regards,

RdJ
Windev 2024/Webdev 2024



Edited 1 time(s). Last edit at 11/30/2023 10:31AM by rdj.
Argus
Re: grDraw(CHART_X) to slow/fast
December 03, 2023 10:10PM
You are probably missing a multitaskredraw instead of your wait
rdj
Re: grDraw(CHART_X) to slow/fast
December 04, 2023 04:24PM
OK thanks, will try that

kind regards,

RdJ
Windev 2024/Webdev 2024
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: