Re: Phix While Loop Inside pGUI Main Loop
- Posted by irv May 16, 2019
- 3006 views
A quick check shows that if GIdle calls a simple Eu function that just increments a variable and returns, that function will be called about 720,000 times per second (on my computer).
That makes me think that you could do quite a bit of processing inside that function, and still have the ability to do "real time" animation. I would probably set up the GTimeout to fire off at perhaps 30 times per second to re-draw the graphics. No need for more than that, you couldn't see the difference.
Also, compiling this simple program doesn't increase the speed much - maybe 750,000. Of course, if the Eu function was complex, then I'd expect compiling would be beneficial.