We have a significant code library with lots of helper functions for standard operations (optical pumping, sideband cooling, detection, etc...) that all our experiments inherit from, but this leads to quite long compilation times. Any of my experiments take nearly 10 seconds to compile, and this is causing issues with some of the things I'd like to do like frequent recalibrations or parameter optimization. My main question is: When exactly is code (re-)compiled? If I have a non-kernel run() function that then calls an @kernel run_core() function multiple times, is it being recompiled each time? Or is it only compiled once? Is there any way to re-use previously compiled code?
Secondly, is there anything I can do to speed up compilation times? 10 seconds seems excessive. I have no interest in re-writing our extensive codebase to be compatible with a pre-alpha version of NAC3 with no np.array support. Short of that, do you have any recommendations? ARTIQ 7 is running in a nix environment in a docker container on an ubuntu machine (we have a container on this machine for each our 6 crates). I have 30 parameters that need regular recalibration, leading to 30 experiments being submitted each time I run a full recalibration. This means 5 minutes spent just compiling.
I have not attached any code because uploading our full codebase seems excessive, but I am happy to provide more details or snippets of any specific aspects.