Kepler/SIL/JJupin - Does including a UDR library affects execution time of code?



Lately we have started to build our own User Defined Routines library with all the little useful functions that we often call. We are also trying to improve the efficiency of our code. That made me wondering what is the effect of including a library in each script we use? Is there any slowdown at all if we just include the library, even if we won't use any function from included UDR?

1 answer

1 accepted

Hi Blazej,


There is always a cost. When you define a UDR, when the script is interpreted, the UDR should be saved for later use. Even if you don't use it, the routine has to be defined. It is always recommended to include what you're actually using. You should group your routines by their logic(e.x. arrayUtils.incl should include array routines) and include them when you're actually using.

If you're using some routines more frequently from a library script, maybe it's a sign they are different than the rest of the script and should be moved in a different script. Find a balance between how much a script should contain and how many scripts should be included. There is no right answer(I/O is slow, but maybe with a SSD is faster to use multiple smaller scripts).


So, in short, you should avoid including functions you don't use. If they are general purpose functions, they might be included into the SIL core and you'll get what you want: speed and all functions available. We are open to suggestions but we'll try to keep the language clean and simple. You can suggest new routines using our mailing support or our JIRA instance for bugs.


Best regards,


Well, you could use caching to spare parse time. Caching is disabled by default, but can be enabled on the scripts very easily. This would avoid such time costs.

@Silviu Burcea Thank you for the directions. Most of the routines that we use are specific to our instance I think, so there is no need to nag you guys about it :) @Radu Dumitriu Do you mean caching set in the SIL Configuration page? Are there any risks connected to caching? Are there any scenarios that caching may slow down executing time of scripts?

AFAIK, no, there are no risks. Cache should update automatically when you change the script. When we introduced it, we didn't want to make it the default (we were scared on possible side-effects). Our plan was to add this as default later on. However, in the fury of N-th developments, this 10 minute task is still in our backlog. (ashamed) As we speak, no bug has been reported on the cache.

Thanks for the valuable information. I'll try to turn the caching on as soon as possible.

Suggest an answer

Log in or Join to answer
Community showcase
Alexey Matveev
Published Saturday in Jira

How to run Jira in a docker container

Everything below is tested on Ubuntu 17.10. I prefer to use Jira in a docker container because: 1. I can install Jira with a couple of commands. 2. I can start and stop Jira just by starting and s...

417 views 6 8
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot