← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #258197]: [1.1.0] Using observe to continuously look for pattern and take actions

 

Question #258197 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/258197

RaiMan proposed the following answer:
Each background observe is run in it's own thread.

One region can only have one observe active, but can have as many on... events as needed.
The events are checked sequentially one after the other restarting the check earliest after a pause given by the ObserveScanRate.

Generally the search region should be as small as possible.

having more than one observer might give some performance boost on
multi-cpu machines (I have no experiences and benchmarks and might
depend from the Java version used).

The decision on how many observers one should have is mainly dependent
from the need for different handlers.

If you only wait for different popups in some area of the screen, that
only need to be clicked away with the same button, then one observe with
such a generic handler might be sufficient.

Another aspect is cpu usage: since visual searching (observe is only a
special use of it) is mainly number crunching, you have to have an eye
on your cpu usage and in doubt use scan rates that reduce the frequency
of observe checks.

So you have to find your own way.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.