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

English Edit question
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
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:


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

RaiMan (raimund-hocke) said : #4

created a request bug