← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #262951]: Performance slowdown

 

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

Description changed to:
Thanks for your help prior RaiMan! The script finally works but I am
hitting performance degradation really fast.

Always at the 4th iteration of the "for" loop, Sikuli slows to a crawl.
The cursor will sit there and image matching will time out mostly. I've
tried to optimize search Region as much as possible. I've tried closing
everything in the computer and just running Sikuli and browser. The
wheel() function and the if() function aren't called within the for
loop, so the slowdown is caused by those.

I am on Sikuli 1.1.0 on OS X 10.10.1.
Any help much appreciated!


setAutoWaitTimeout(3)
setFindFailedResponse(SKIP)
Settings.MoveMouseDelay = 0
Settings.WaitScanRate = 10

aaFirstlink = Region(0,0,422,137)
aaProfile = Region(165,195,87,32)
itWSR = Region(35,450,222,213)
itASR = Region(20,380,260,180)
closeTR = Region(23,22,28,31)
passwdR = Region(460,150,500,300)
rightclickR = Region(0,0,800,700)

lineHeight = 48
link = aaFirstlink.find("1424991213367.png").offset(Location(2, 30))
for i in range(7):
    App.focus("safari")
    if (i != 0) and (i % 10 == 0):
        wheel(aaFirstlink.getLastMatch(), WHEEL_UP, 12)
        link = aaFirstlink.getLastMatch().offset(Location(0, 30))
    link.rightClick()
    wait("1425009381807.png")
    click()
    aaProfile.wait("1424834582178.png",10)
    click(aaProfile.getLastMatch())
    wait(2)
    itWSR.wait("1424835540285.png")
    click(itWSR.getLastMatch())
    App.focus("iTunes")
    wait(3)
    itASR.click("1422904493043.png")
    if passwdR.exists("1422744785839.png",1):
        type(getLastMatch(),"xxxxxxx")  
        if exists("1422744848431.png",1): 
            click()
        if exists ("1423777812879.png",1):
            click()
    App.focus("safari")
    wait(2)
    closeTR.click("1425009533953.png") 
    wait(2)
    link.y += lineHeight

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