User talk:Jofur: Difference between revisions

no edit summary
No edit summary
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 20:
 
Please take this as hints, 'cos I very much appreciate your and Demivecs continuous engagement supporting PureBasic on RosettaCode. best regards ~ --[[User:Vera|Vera]] 11:52, 14 July 2010 (UTC)
 
Thank you for the feed-back, I've updated the code to reduce tle CPU-load, made the tre age, and also put the constants internally. I hope that this will make it run better on Linux. --[[User:Jofur|<Jofur>]] 14:37, 14 July 2010 (UTC)
 
:Thanks for the changes. It starts fine, except for #Black declaration is missing at the moment.
:Unfortunatly the CPU-load is as high as before (seems it even encreased by another 5%). Also uncommenting the delay(15) didn't change it. And testing different timeouts didn't seem to have any effect until I tried to hard-set them:
::AddWindowTimer(0,0,2000) - lowered it down to 60-70%
::AddWindowTimer(0,0,3000) - lowered it down to 40-45%
::''(which is ok for me to let it run a longer time and enjoy the spreading burning)''
 
:btw: to track the time frames is interesting to know :) ~ --[[User:Vera|Vera]] 17:00, 14 July 2010 (UTC)
 
Thank you Vera, I'm not so skilled on Linux & your feedback is very valuable.
I think it is most likely the graphic drivers you use that make the Plot() demanding on your CPU, I would first recommend that you reused the With/Height secondary increased the WindowTimer or activate the Delay() with 1-2 frames delay. Could you try to run it minimized, e.g. without drawing to the screen?
The only function that may use larger amounts of CPU power would be the Random() which is demanded on each object. --[[User:Jofur|<Jofur>]] 20:33, 14 July 2010 (UTC)
 
 
:Hi Jofur,
:1. major significant difference is to use an ImageGadget
:-> that reduced nearly all CPU-load (40%) of the windowprocess (to 3%) without increasing the exe value
:-> the framerate becomes significantly faster
:-> the colors become more intense
 
:2. reducing With/Height makes about -10% per 50px/50px
 
:3. increasing WindowTimer is what helps a lot (see workaround)
 
:4. minimizing never made any difference to the CPU-load
 
:5. activating a frame-delay in UpdateMap seems essentially effective: reduces CPU-load down to 10-20% constantly on Win (35% on Linux), indepenant of what image dimension or timeout is set to
 
:This time I also checked running it on WIN XP (same PC). There I had the same CPU-values - so it's not due to the graphic driver, but maybe the graphic card ... (I don't know much about grafic concerns).
:Though the achieved workaround may be fine, there is a kind of flickering (quickly showing black shadowed sections/bars on redrawing - like TV in old days) on WIN, which didn't react on any changes I made while testing. So it's another concern but much less important than the CPU question ☺
 
:Here's my test-workaround for you: [http://vspure.bplaced.net/dls/ForestFire-vs1.pb]. greetings ~ --[[User:Vera|Vera]] 11:37, 15 July 2010 (UTC)
71

edits