20 Observers, Slow Clicks. (using java)

Asked by Matthew Lebo on 2020-11-29

I am starting 20 observeInBackground(). If I do any clicks before the observers are started, I get 20ms clicks. after the 20 observeInBackground() are started, I get clicks anywhere from 2000ms to 6000ms.

I'm using Java (sikuli jar 2.0.4), Windows 10, I have 64 gigs of ram and a 16 core AMD processor. CPU never jumps above 2% and memory is at 14gigs.

How can I get better response time from the clicks?

I'm ok to stop the observers during a click sequence and then restart. What the best way to stop all 20 and restart with different patterns without memory leaks? I tried in a List<Region> and would set an existing list item to a new Region and call observeInBackground() and stopObserver() on each item in the list but things got even slower...

any guidance would be appreciated, thank you!

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Solved by:
Matthew Lebo
Last query:
Last reply:
RaiMan (raimund-hocke) said : #1

If you send me a code sample, I will have a look into it and make a suggestion.
TO: sikulix---at---outlook---dot---com

Matthew Lebo (digitalml) said : #2

I was able to solve this speed issue by reading the and better understanding the documentation around observers and disabling / reenabling all of the observers before and after my click sequence.