I am working on a project where parts have been easier to write in Python and other parts easier to write in Julia. I just now finally put everything together, and the good news is that it works! But it's terribly slow due to Julia reloading packages every time it's called (and it's called often). I know I should have thought of this beforehand but here we are.
Is there a way I can "initialize" Julia within the Python script and load the modules I want to use once, instead of paying the price every single time I want to use it? Right now the Julia script is just called using subprocess.call(['juliaScript.jl'])
.
Starting to regret this approach but I really don't want to go through and re-write all the Julia code in Python (or vice versa). The Julia script is called in a double nested for loop in Python so the loading time costs are very significant and annoying.
I have heard of Precompile.jl but it seems very complicated and I think I would rather translate all the code between languages than learn that... I'm hoping someone has a wonderful hack job fix before I start re-writing everything. :)
If it helps, the packages I am loading in Julia are DataFrames, CSV, FFTW, and Statistics.