I have a general programming question (which I need to tacking using Julia). I have a couple of functions (that call other functions) to carry out my analysis (some signal processing tasks and sorting data the way I want). In turn these functions are called by a pipeline function that runs series of functions and takes specific outputs from them, and generates plots.
Sometimes I have to go back to the nested “analysis functions” to change something, however, these tweaks are usually very deeply nested so I’ve been manually change parts of the function and generate plots. This was fine when I had to run an instance or two, but now having to run the code several times I have address how to efficiently change the internals.
If I make optional arguments in the highest level function, it will have to to be passed down several functions which doesn’t seem right. I am currently thinking:
Make a global parameter variable, a named tuple, that the functions access. This puts all my parameters in the beginning of the script and I can iteratively add different parameters to it. But i will be using global variables
Change the layout of the analysis.
Would appreciate some feedback. Is going for a global parameter variable going to be very poor for performance? I need to be able to dynamically be able to modify parts of the pipeline that I had not previously considered needing flexibility. Perhaps the drop of performance is okay at this level, where I am trying different pipeline parameters? [~80% of my computation time is on reading the data, and the analysis doesn’t take more than about 5 minutes]