← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #661348]: Progam slowing down - MouseDown: extended delay

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
@Shekar
Thanks for feedback.

Yes too many observer events in parallel can slowdown, since the needed
search actions internally are done one after the other in a row in the
interval given by the observe scan rate.

But this is only true for the events registered with the same Region
object: this is usually the case, if you register all events against the
SCREEN object (using undotted onXXX...()).

each Region.observeInBackground is done in a seperate thread, so the
observes for different region objects are done in parallel.

So with this trick you can run the events of one region in parallel, by registering the single events to a copy of the base region:
reg1 = someRegion
reg1.onAppear...
reg1.observeInBackground()
reg2 = Region(reg1) # a new Region object of the same region
reg2.onAppear...
reg2.observeInBackground()
...

-- 
You received this question notification because your team Sikuli Drivers
is subscribed to the question.