Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Improve jar start up time #123
The start-up time is ridiculously long. The example below shows how long it takes before Plant UML realises that the given file argument doesn't actually exist.
Six seconds to do nothing is far too long! This is definitely a problem for plug-ins such as the one mentioned in my comment here because it takes an additional six seconds to export the file.
It would be awesome if the load time could be greatly reduced.
The most significant slow part is this https://github.com/dylan-chong/plantuml/blob/test/slow-loading/src/net/sourceforge/plantuml/Run.java#L215
As can be seen in my benchmarking results when given an argument which is a nonexistent file (see the code in the link above):
When given a simple file as an argument , these are the results (total time 10s):
And been given a simple file as an argument with the forceOpenJdkResourceLoad() line commented out (total time 6.7s):
I'm just messing around the benchmarks i have no idea what i am doing.
Why is the forceOpenJdkResourceLoad() call required? It seems to be slowing down the export
Some users had some issues running PlantUML with OpenJDK (process was hanging).
BTW, which Java JVM are you using ? It looks like you are using a Oracle JVM.
What we can do, is to test in the Java code which JVM is used and call forceOpenJdkResourceLoad() only is the underlaying JVM is OpenJDK.
I'm still interested in your tests. I don't understand why option management is so long: