3 ms·
I think the startup time in Spring got that long due to resolving graph of dependencies at runtime.
by letientai299 8y ago
I think the startup time in Spring got that long due to resolving graph of dependencies at runtime.
- jackpeterfletch 8y agoI remember reading somewhere that Java 9 modules will solve exactly this, as only the required parts of libraries are loaded, and significantly on the used parts of the standard library.
- kimi 8y agoThe JVM already does that - it only loads things it needs. So you can have a 2M dependency and only use one static function of a single class in there, and it will only load that - but you have to distribute the whole JAR. With Jigsaw, things are split up, so you can have only the stuff you need.
- jacques_chester 8y agoIt's disk I/O. The JVM basically loads classfiles one at a time. When you use Spring Boot, you are asking Spring to pull in potentially thousands of such classes. Preliminary tinkering by Spring folks shows Graal having a substantial impact there too.