← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #702646]: Optimizing resource usage

 

Question #702646 on SikuliX changed:
https://answers.launchpad.net/sikuli/+question/702646

    Status: Open => Answered

RaiMan proposed the following answer:
Since I cannot see your screen content and do not really understand the
workflow based on your info, I give you this general advise: When using
SikuliX for workflow automation, first try to script, what you would do
manually to reach the target situation. In most situations this is
sufficient. Then add some logic, to evaluate the auto start of you
workflow. All this usually is a sequence of wait's and click's.

on resource consumption: in the standard SikuliX tries 3 times per
second when waiting for an image. On slow machines this usually leads to
up to 100% peak machine use and high average over the time (especially
with FOREVER).

So you either have to use exists(img, 0) (only one search)  and a loop
construction that wait's in between (e.g. wait(0.5)) or you use the
parameter Settings.WaitScanRate to reduce the tries per second (e.g. 1
is 1 per second, 0.5 is one every 2 seconds, ...).

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for SikuliX.