Re: [Sikuli-driver] [Question #665855]: SikulixIDE 1.1.2 - Would it be possible to optimize a long if/elsif/else loop with exists() inside?

2018-03-19 Thread RaiMan
Question #665855 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665855

RaiMan proposed the following answer:
depends on the system.

CPU: recent 2 or 4 core cpu beyond 2.5 GHz.

Linux systems should have at least 4GB storage.

For Windows at least 8GB are recommended (I have a windows 10 running on
i7-2600 @ 3,4GHz, 16GB RAM)

My Mac systems run smoothly having 8GB+  (2,5+ GHz Intel Core i5)

Generally: the more physical RAM the better.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #665855]: SikulixIDE 1.1.2 - Would it be possible to optimize a long if/elsif/else loop with exists() inside?

2018-03-19 Thread PowerPenguin
Question #665855 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665855

PowerPenguin posted a new comment:
Alright, it's ok then, thank you very much for your help! I have one
last question, but it's alright if I don't receive an answer on this. If
I were to make this work, what kind of computer would I need? Can you
guide me a bit on that topic? Thank you!

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #665855]: SikulixIDE 1.1.2 - Would it be possible to optimize a long if/elsif/else loop with exists() inside?

2018-03-19 Thread RaiMan
Question #665855 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665855

Status: Open => Answered

RaiMan proposed the following answer:
Yes, searching for 198 images in parallel on the whole screen might lead
to some memory constraints and cpu usage problems. but this only affects
the cpu situation while the above snippet is running. If there are
problems befor and /or afterwards, they have nothing to do with SikuliX.

findAnyList() is more effective than a series of exists() with more than
5 images.

... and no, there is no other solution than these two for your problem.

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #665855]: SikulixIDE 1.1.2 - Would it be possible to optimize a long if/elsif/else loop with exists() inside?

2018-03-18 Thread PowerPenguin
Question #665855 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665855

Status: Answered => Open

PowerPenguin is still having a problem:
Hi, thank you for that. I haven't tried it, but now I have. I loaded the
images inside an array, but I noticed with the debug on that it was
using a lot of my cache and as a result my computer was very slow, not
only when trying to figure out which image was on the screen, but also
with the animations showing in the website or when writing something (it
needed some seconds for the letter to start appearing). This is probably
because they are a lot of images and my computer may not be able to work
on that level. Is there anything else I could do?

I leave my code here, I renamed the images to p0, p1, p2 etc and the
image it needs to clic after finding each result as r0, r1, r2.

r = regionOfTheScreen
r.setAutoWaitTimeout(0)
images = [p0.png, p1.png, p2.png, etc]
while True:
matches = a.findAnyList(images)
for match in matches:
 click("r"+str(match.getIndex())+".png")

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #665855]: SikulixIDE 1.1.2 - Would it be possible to optimize a long if/elsif/else loop with exists() inside?

2018-03-17 Thread masuo
Question #665855 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665855

Status: Open => Answered

masuo proposed the following answer:
Did you try findAnyList() ?
http://sikulix-2014.readthedocs.io/en/latest/region.html#find-more-than-one-image-in-a-region-at-the-same-time

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp


Re: [Sikuli-driver] [Question #665855]: SikulixIDE 1.1.2 - Would it be possible to optimize a long if/elsif/else loop with exists() inside?

2018-03-17 Thread PowerPenguin
Question #665855 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/665855

Description changed to:
Hello, I have a long piece of code and I was wondering if it would be
possible to optimise it so it goes faster. I have to check certain
region of the screen constantly to see what appears in it. The problem
is that it can appear up to 200 different things, so it needs to compare
200 different images with whatever is in the screen until it founds the
right one, and it has do to something different in the screen with each
one of the possible options. Right now, it does that just fine, but if
the image that appears is the last one of the loop it needs around 25
seconds to match it, and I would like to know if it would be possible to
reduce that time.

This is my code:

r = regionOfTheScreen
while True:
if r.inside().exists((Pattern(img1).exact()),0):
#do something
elif r.inside().exists((Pattern(img2).exact()),0):
#do something else

+198 elifs more with the same form.

Could I change something to make it faster? I already run it with only
the necessary programs running on my computer and I check the smallest
possible region of the screen.

Thank you!

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

___
Mailing list: https://launchpad.net/~sikuli-driver
Post to : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp