Help reducing compilation and inference time

Is it possible you are seeing a manifestation of this issue?

https://discourse.julialang.org/t/investigating-large-latency-on-a-constrained-windows-environment/114482

You describe your problem quite differently so probably not but, just in case…