High Cpu load by starting and stopping observer in while()
Greetings, I'm Jerry. I'm using sikulix ide 2.0.5 to create a bot for a browser game for myself, and currently I have a problem with cpu load. Here's some details.
I'm using 10 onAppear for 1 observer on 1 region. After defining the onAppear first at start, I use while(1) then start and stopping the observer in it.
At first run, the cpu load only around 10-11%, but after about 10 repetitions, the cpu got high load around 75-80%. After I check, for 1 repetition, the cpu load increases around 5-10%, and keep going up.
Here's a snippet on the script :
DefineOberver() #onAppear declaration goes here
While(1)
MyRegion.
Raid()
MyRegion.
Any idea why this can happen, and how to solve this? I can put more of my codes here if it helps.
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: