I write single-page applications with a full Clojure stack, based on Luminus. I’ve been doing this for some time before recently encountering a problem; we couldn’t deploy our uberjar/war; it would just fail. Debugging step one, just running the jar locally, seemed to fail too – seemed. It turned out it wasn’t failing but was taking 3-7 minutes for the application to start. This is why trying to deploy it to our public server (into Wildfly) was failing: it was timing out. My attempt to fix this problem by removing most of the routes did not seem to effect my start times.
I’ve never had a program that compiles ten or twenty times faster than it actually deploys. How can I go about profiling or debugging this to find out what’s causing the slowdown?