2 ms·
> Spring uses a lot of reflection. It makes it very slow. The startup time of Spring applications tends to be around 20-30 secs. If you add Hibernate to the mix
by jacques_chester 9y ago
> Spring uses a lot of reflection. It makes it very slow. The startup time of Spring applications tends to be around 20-30 secs. If you add Hibernate to the mix the situation becomes even worse.
The load time of Spring apps is dominated by the number of classes loaded from disk, which is a function of the libraries pulled in. This is because the JVM loads classes out of JARs more or less linearly.
Think about it for a second: which is faster, in-memory operations (reflection) or I/O (loading classes from disk)?
Dave Syer has done more actual empirical investigation[0] of Spring's launchtime behaviour than anyone. If you can produce better evidence of actual behaviour, I'll be very surprised.
[0] https://github.com/dsyer/spring-boot-startup-bench https://github.com/dsyer/spring-boot-startup-bench
Disclosure: I work for Pivotal, we sponsor Spring development. I do not work on Spring.