GLBehaviours CPU usage down (boom example)

Johannes
2011-06-18
2013-03-15
  • Johannes
    Johannes
    2011-06-18

    GLScene Version : v1.1_March_2011_SVN_revision_5593
    Lazarus : 0.9.30
    File : GLBehaviours.pas
    Function : DoProgress
    Added and end of function : Line 573
    sleep(10); //JOHANNES PRETORIUS 18 June 2011

    good day.

    I noticed the boom and fire example both took high cpu usage of till 50% on my box. I played a little and this was the main improvement  I got that brought it down to 20% average the whole time.

    Hope it can help somebody.
    thanks

    Johannes

     
  • Johannes
    Johannes
    2011-06-18

    Note the cpu usage was when running in the compiler. lower cpu if run outside compiler.

     
  • Johannes
    Johannes
    2011-06-18

    Outside compiler it takes max 10% cpu now. Hope it helps tx

     
  • YarUnderoaker
    YarUnderoaker
    2011-06-19

    You may doing same by changing TGLCadencer.SleepLength