3 ms·
Does this app take 5 minutes to start? That's so much dynamic Spring magic. Also, how do you keep track of control flow when anything at anytime could have been
by robmccoll 6mo ago
Does this app take 5 minutes to start? That's so much dynamic Spring magic. Also, how do you keep track of control flow when anything at anytime could have been overridden by something else? It seems like tracing and debugging this thing would be like exploring someone else's codebase every time.
- switchbak 6mo agoThe class loading magic means you need to be exceptionally careful about things that would otherwise be very innocuous. It’s the rule, not the exception - that your average spring boot app will be doing tons of expensive stuff at startup. Most of which is unnecessary and was not even intended. The JVM doesn’t need this kind of thing either, and it gets a bad wrap from the J(2)EE days, and the “simple” replacement that Spring was supposed to be. No doubt there’s some benefits to be had, but I don’t think the trade-offs are worth it, especially at larger scales.
- smrtinsert 6mo agoThe article talks about a specific solution they came up with. No way is this a representative example, they discard a typical pattern way at the top.
- krzyk 6mo agoWho cares about startup times if apps is started only when new version is deployed? And 5 minutes is a bit long, maybe someone is doing some database operations during start?
- robmccoll 6mo agoI care because every second of that startup time is lost productivity and focus. For me and any developer on my team. Hot reload only works if no class or method has changed so that's not a solution. I've worked on codebases of similar size and complexity in many languages, and the developer experience of a compile and restart that takes less than five seconds is game changing.
- tracker1 6mo agoI can imagine a full build of the project(s) in TFA are on the order of several minutes to build/run the first, and maybe every time. I remember working on projects before SSDs were common that would take on the order of a half hour or more... the layers of abstraction were so that you literally had to thread through 15+ projects in two different solutions in order to add a single parameter for a query and it would take a couple weeks to develop and test. That said, I did catch up on my RSS feeds during that job.
- guzfip 6mo ago> It seems like tracing and debugging this thing would be like exploring someone else's codebase every time. Oh man, just wait till you start sprinkling some AOP in there. My debugger is damn near useless sometimes as I try to follow bizarre paths between parts of my code.
- robmccoll 6mo agoTotally! But it doesn't have to be this way.