Is it possible to speed up the code?

Asked by rahidyll brito on 2018-08-31

Good evening, I would like to know if there is another such as: Settings.waitScanRate. the truth that code has worked for me, I have noticed that the speed has improved, but I would like more speed while looping. Is this possible?
at the moment of executing my code, my virtual memory does not increase, so I do not understand why it is slow, it is not an exaggerated slowness, but I would like to accelerate it more. I have windows 7 32 bits, maybe it has to do with my operating system?

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
masuo
Solved:
2018-09-01
Last query:
2018-09-01
Last reply:
2018-09-01
masuo (masuo-ohara) said : #1

The smaller the search range, the shorter the time to finish searching.
Have you read the document on this page?
https://sikulix-2014.readthedocs.io/en/latest/basicinfo.html#sikulix-how-does-it-find-images-on-the-screen

rahidyll brito (botter) said : #2

I have 10 if, in which I put an exists and a screenshot which I cut to get the area I need, do not use a region, the trick is to do it by region?

Best masuo (masuo-ohara) said : #3

Are you want to shorten the time to return the result of exist ()?
If image is not exist on screen, exists() return result after 3 seconds.
If you specify maximum waiting time to zero as exists, exists() return result immediately even if image is not exist on screen.
[example]exists("image01.png",0)

If you want to search for multiple images, it's better to use findAny () rather than using exists () multiple times.
https://sikulix-2014.readthedocs.io/en/latest/region.html?#find-more-than-one-image-in-a-region-at-the-same-time

rahidyll brito (botter) said : #4

muchas gracias por su tiempo y me disculpa

rahidyll brito (botter) said : #5

Thanks masuo, that solved my question.