← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #296402]: Best practice ?

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
looking for 100 patterns in one region at the same time is really
challenging.

I guess you currently loop around 100 
if region.exists(pattern, 0)

hopefully baked into a def and having the patterns in a list.

If everything goes well and all is optimized (smallest region possible)
the average match time for one of the patterns should be somewhere
between 5 and 10 seconds (assuming 100 msec per search and 100 patterns)

If this is not sufficient, then the only chance to get faster with
pattern search is to use observe in background with different region
objects (for the same area on screen) and groups of patterns, to
delegate the search into a reasonable amount of parallel threads
(assuming a capable system).

You might as well try to use observe with onChange() in the given region. You would at least find the area where something changed, but this still leaves you with the need to find out, what pattern popped up.
Supposing, that in this case, the region to look in, has the size of the patterns, then it might be possible to find out which pattern appeared within on second in average (assuming 10 msec per search and 100 patterns).

as already mentioned: challenging ;-)

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