← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #253560]: Can we preload java libraries for sikuli

 

Question #253560 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/253560

    Status: Open => Answered

RaiMan proposed the following answer:
--- as long as the scripts are run in the same JVM, the stuff is only
loaded once

Running scripts in parallel in different JVMs will lead to startup processing in each JVM.
But running scripts in parallel in different JVMs does not make any sense, since Sikuli currently has no means to coordinate mouse and keyboard usage in these situations.

Up to version 1.0.1 the Sikuli stuff is in no aspects thread safe and
does not coordinate mouse/keyboard between threads/processes at all.

Beginning with version 1.1.0 mouse and keyboard usage can be coordinated
between threads/and processes and it will be possible to run scripts in
parallel in the same JVM (ScriptRunner.runScript()). But this is not yet
available/fully tested.

If you want to do anything of value in this area, then you might look into the sources on github (start at sikulix.com).
the native stuff is loaded in org.sikuli.basics.ResourceLoader.

But as already mentioned: The library loading is not taking the time,
it is the startup of the Jython script runner, that takes the time. It
is on the list, to check the possibility of caching in this area.

… and if you just use the solution mentioned in comment #1, you only
have the startup time once.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.