I was wondering if the size of jar file has any implications for the peformance of the Java Virtual Machine?
Is there going to be a point where the jar file becomes too large that the JVM will not be able to function effectively?
I was wondering if the size of jar file has any implications for the peformance of the Java Virtual Machine?
Is there going to be a point where the jar file becomes too large that the JVM will not be able to function effectively?
In my opinion the size of the jar is not the factor to look at when trying to increase performances.
If you have big jars, it means you have lot of code. If you have lot of code because you are working on a complex project, all is ok for me. If you have big jars for a "simple" project it may means that the code need to be thinking again => Well designed classes are often the way to achieve the smaller code size and thus the smaller jars.
Yes, the size of the jar file has implications on performance. The more appropriate question is, does it have any significant implications? The answer to that question is no.
Yes, there is a point where the jar file becomes too large and affects the JVM. I don't know where it is, but it's somewhere near the size of your system memory. If the JVM cannot load the entire JAR file and the Java libraries in system memory without swapping, this will certainly affect performance.
This isn't something you need to concern yourself with. Don't include JAR files in the classpath that aren't being used. Don't include a bunch of code in your project JAR file that isn't being used. I highly doubt you'd be creating an application anywhere near the size required to impact the performance of the JVM.