Profiling Sikuli

Asked by hundreddaysoff

Hi, I'm trying to profile a slow Sikuli script I wrote and wondering about my options. I'm using Sikulix 1.1.2 on OS X. Neither of the standard Python profiling modules seem to be available in Sikuli's Jython distro (Profile and cProfile). Is there another option, or else is it possible to make Sikuli's Jython distro aware of a standard profiling module for Python 2 if it's installed outside Sikuli's distro?

Sorry for any ignorance. I'm new to Jython and Sikuli but more experienced with vanilla Python.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

Profiling SikuliX scripts usually does not make sense, since the timing mainly depends on the reaction of the GUI. In many cases SikuliX scripts are even too fast, so one has to insert additional waits or image searches to synchronize the workflow.

If one thinks, that a workflow runs too slow, then the only available optimization is to take care, that the search region is made as small as possible. Compared to the whole screen as search region an search region that is not much larger than the searched image, will usually reduce the reaction time from about 1 second down to about 100 msecs on average.

Any profiling tool used from a command line must be compatible with Jython (I do not have any experiences).
Another option might be to use Eclipse/PyDev or PyCharm.

SikuliX itself does not have any feature about that, apart from debugging with timestamps.

Can you help with this problem?

Provide an answer of your own, or ask hundreddaysoff for more information if necessary.

To post a message you must log in.