I have used userimg.jl to build sysimg including a file with my function, which I know takes a long time to compile (i.e. execute the first time). This worked for some time and then mysteriously stopped - despite loading this sysimg, the first execution of this function takes ages. I assume that my sysimg is missing something important for this function to compile during sysimg building.
The question is: is there a way to track what is happening on the first execution and causing the delay? The function takes no arguments and accesses no globals (none that I know of at least...). It does use other modules but they are included in the userimg as well.