Does SikuliX cache regions of detected images?

Asked by Evgeny Petrosyan on 2018-09-27

If SikuliX found images by findAll/find/etc. methods and in some time they should be found again. Does SikuliX check regions where this images were found first?
In other words: should I save regions of images manually and use it for next search or Sikuli do this optimization instead me?

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2018-09-27
Last reply:
2018-09-27
RaiMan (raimund-hocke) said : #1

Principally yes, it does cache this information, but only for the current scriptrun.
A persistence feature is not yet available.

So if your intention is only during 1 scriptrun, then you have to use version 1.1.3 with Java 8.
So make your experiences especially with the timing.

Settings.ImageCache = 0 # switches off caching completely (default 64)
Settings.CheckLastSeen = False # switches off the checking - caching must be on

In 1.1.4 the caching feature is not yet reimplemented.

Not sure, wether it is really needed.
So your experiences would help to decide.

RaiMan (raimund-hocke) said : #2

To watch the caching in the log, you have to switch on debugging:

Debug.on(3)

Evgeny Petrosyan (epetrosyan) said : #3

Aha! That is why I didn't see caching in v1.1.4. It will be good to implement this feature.

The most popular action for me is "closeAll". Sikuli looking for any [X] button on the screen, presses it, closes popup and repeats cycle until close buttons exist. I can't predefine these areas because buttons can be in random places on the screen, but it is obviously that these places can be around 10-20

Can you help with this problem?

Provide an answer of your own, or ask Evgeny Petrosyan for more information if necessary.

To post a message you must log in.