Sikuli is using a lot of RAM

Asked by Sikuli User

I've just seen how much RAM is Sikuli using..write in this moment task manager is showing me that Sikuli is using 101.524MB!! Is this normal? After all, that's a lot of RAM and it doesn't look good to me.

Also, Sikuli is starting very very slow..I wait few minutes until I can see the program.

I should mention that later versions of Sikuli were better - the start was faster, and they didn't eat so much RAM and I had no errors regarding insufficient memory. At this moment I've tested version 0.10.1 on 4 (four) computers and one had even 6GB of RAM with a quad 4 processor but there still were errors about insufficient memory throwing by Sikuli.

Anybody knows something about these things?

Many thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
Tsung-Hsiang Chang
Solved:
Last query:
Last reply:
Revision history for this message
Tsung-Hsiang Chang (vgod) said :
#1

It's caused by a memory leaking bug.

Revision history for this message
Sikuli User (hidden-hidden) said :
#2

Thanks. That's too bad. I have a script of only few lines and I also use regions at this moment to avoid letting Sikuli to check the whole screen(2048x1152).

Is there any advice I could use in order to avoid that bug?

Thanks!

Revision history for this message
Best Tsung-Hsiang Chang (vgod) said :
#3

Sikuli 0.9.9 doesn't have this memory leaking issue, its API is not comprehensive as 0.10's though.
But if your scenario is not that complicated, you can use 0.9.9 as a temporary solution before we fix this bug in 0.10.

Revision history for this message
Sikuli User (hidden-hidden) said :
#4

Thanks Tsung-Hsiang Chang, that solved my question.

Revision history for this message
belemekadem yassine (m-y-belemkadem) said :
#5

Hello!
i'm using Sikuli Version X-1.0rc2 on Mac OS X 10.6.6
Once launched, Sikuli use 100-120 Mo of RAM
by execution 300 simple test cases ( 3 test cases repeated 100 times with a "for" loop ), sikuli use more than 500 Mo of RAM (sometimes 900 Mo ) and this RAM space is not released after the execution of these test cases

Is there a way to free the memory after the execution of test cases ?

Here is what my test cases look like:

import unittest
class TestSequenceFunctions(unittest.TestCase):
 def test_001(self):
  appSafari = App("/Applications/Safari.app")
  appSafari.focus()
  click( )
  click( )
  assert(exists( ))

 def test_002(self):
  appSafari = App("/Applications/Safari.app")
  appSafari.focus()
  click( )
  click( )
  assert(exists( ))

 def test_003(self):
  appSafari = App("/Applications/Safari.app")
  appSafari.focus()
  click( )
  click( )
  assert(exists( ))
  click( )
  click( )
  click( )
  click( )
  click( )

suite = unittest.TestLoader().loadTestsFromTestCase(TestSequenceFunctions)
for i in range(100):
 print("test numero: "+ str(i))
 unittest.TextTestRunner(verbosity=2).run(suite)