Hello All,
is there any advantage in creating a groovy script file in the file system vs put it as in-line in Script Runner. Wondering how to following will be affected.
Thanks Steven and Nic. Couldn't agree more on re-usability and source control.
What about performance, does Jira load the scripts into cache just in time? if that is the case would there be a lag in using as post function lazy loading.
Buh, sorry I tend to speak-first-and-ask-questions-later -- I didn't mean to come across so negative. At one point I had improperly implemented the Condition interface and scriptrunner unloaded -- Enabling it just kept unloading it. At this point I figured I had to remove it by hand from the DB and I wasn't super pleased with how the storage was done, but I also am aware that it doesn't REALLY matter because they're compiled anyway.
The most important point made in this thread is your last point -- PUT THEM IN SOURCE CONTROL! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian didn't give Jamie much choice on storage, but we all know it's a bit rubbish.
For dev/test and the odd ad-hoc short script, it will do. To answer your main question, on all 4 points, it's negligible. The change in usage between file and db storage is so small, you will struggle to see it.
Personally, I go for file system storage of scripts, so that I can re-use them without copy/paste/remember-to-update-in-many places, but more importantly, I can also put them in source control.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The way the inline source is stored is bad. It stores all items in a string, as a JSON Object, in a JSON Array, in a single cell of the database.
This really hurts if you need to manipulate them without the app online, such as if you create a script that takes down jira/unloads the plugin.
However, since the scripts are compiled and stored on filesystem or inmemory anyway, after initial load I suspect they are identical.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.