← 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

    Status: Answered => Open

Joe Tibbetts is still having a problem:
I rewrote parts of the code based on your suggestions. I'm still seeing performance degradation after 50 seconds or so.
I made a screen capture video of the problem, here at Youtube. Code below.

https://www.youtube.com/watch?v=Cr_MAVfVWo4


Answers to your questions:

-- The wheel() function and the if() function aren't called within the for loop, so the slowdown is caused by those.
what do you mean by that?

Sorry, I meant "The wheel() function and the if() function aren't called
within the for loop, so the slowdown is NOT caused by those"

-- so what do you mean by slowdown? that the cursor does not move
anymore?

Yes, as you can see in the video, everything slows down to a crawl. Each
action takes tens of seconds to do, if not more.


CODE:

Settings.MoveMouseDelay = 0

aaFirstlink = Region(0,0,422,137)
aaProfile = Region(100,150,200,150)
itWSR = Region(35,450,222,213)
itASR = Region(20,380,260,180)
closeTR = Region(21,23,29,27)
passwdR = Region(460,150,500,300)
rightclickR = Region(0,0,800,700)

lineHeight = 48
if aaFirstlink.exists("1424991213367.png",0):
    link = aaFirstlink.getLastMatch().offset(Location(2, 30))

for i in range(7):
    print i
    App.focus("google chrome")
    if (i != 0) and (i % 10 == 0):
        wheel(aaFirstlink.getLastMatch(), WHEEL_UP, 12)
        link = aaFirstlink.getLastMatch().offset(Location(0, 30))
    link.rightClick()
    wait(1)
    if exists("1425009381807.png",0):
        click()
    wait(3) 
    if aaProfile.exists("1425096831076.png",0):
           click(aaProfile.getLastMatch())
    wait(3)
    if itWSR.exists("1424835540285.png",0):
        click(itWSR.getLastMatch())
    App.focus("iTunes")
    wait(2)
    if itASR.exists("1422904493043.png",0):
        click(itASR.getLastMatch()) 
    if passwdR.exists("1422744785839.png",1):
        type(getLastMatch(),"Otau1983")  
        if exists("1422744848431.png",1): 
            click()
        if exists ("1423777812879.png",1):
            click()
    App.focus("google chrome")
    wait(1) 
    if closeTR.exists("1425009533953.png",0) :
        click(closeTR.getLastMatch())
    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.