JuMP takes long time to load the problem/model

It would be helpful if you could isolate which part of the code is taking a long time. How log does it take if you comment out optimize!(model) onwards?

"You should look at your memory usage as the program is running.” How could I do this?