Running a function is extremely slow

I wrote a Julia function and on the first line inside the function, I had a print statement. After I call the function in REPL, It takes a long time for it to get to the first line of the function. Does anyone know what the issue is?

PS: the function used JuMP in later lines, I don’t know if it has anything to do with this.

Can you provide a minimal working example?
Normally print statements should be printed quickly after calling a simple function, right?

And are you aware of that the first call includes the compiling overhead? What happens if you call it a second time?

3 Likes