In that case I suppose you will have to start profiling your code to see where the time is spent and allocations are coming from using something like
https://docs.julialang.org/en/v1/manual/profile/
Here’s a whole recent thread on profiling allocations: