← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #691654]: Sikuli script consuming a lot of RAM

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
I made some tests with VisualVM and that shows, that there is no
permanent increase of memory consumption.

Java allocates a so called heap for application memory.
When an application runs, memory is allocated until this heap is nearly full.
Then Java's so called garbage collection frees memory from the heap, for objects, that are no longer in use (reference count 0).

So while a SikuliX script is running, the memory usage increases, until
the garbage collection frees memory again.

Usually it is not necessary, to limit the heap size, since appropriate defaults are used.
But on systems with little memory it might make sense to do so.

here is a nice article about Java memory usage and control:
https://alvinalexander.com/blog/post/java/java-xmx-xms-memory-heap-size-control/

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.