Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggestion - CPU usage high with bot sitting idle
#1
Hey, I noticed the CPU usage of the 5.3.4 version (only one I use right now) was about 50% (laptop has 2x CPU so it consumes 1x CPU).  I tested and reduced the consumption by adding a sleep() function to while loop of the the GUI input.

Code:
While 1
GUIGetMsg()
If _GUICtrlComboBox_GetCurSel($cmbTroopComp) <> $icmbTroopComp Then
$icmbTroopComp = _GUICtrlComboBox_GetCurSel($cmbTroopComp)
SetComboTroopComp()
   EndIf
Sleep(100) ;Reduce the CPU consumption by 90+%
WEnd

Hope this is useful.

Cheers!
Reply
 


Messages In This Thread
Suggestion - CPU usage high with bot sitting idle - by Revial - 01-07-2015, 01:16 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)

About The Bytecode Club

We're a community focused on Reverse Engineering, we try to target Java/Android but we also include other langauges/platforms. We pride ourselves in supporting and free and open sourced applications.

Website