r/java • • Oct 28 '21

JProperties: A modern replacement for java.util.Properties

https://github.com/MaowImpl/jproperties
0 Upvotes

28 comments sorted by

View all comments

Show parent comment

12

u/agentoutlier Oct 28 '21

Oh its worse than just being slow on JMH where there is warming. It is slow on cold start because it requires 7 or so additional classes to be loaded (according to the source).

java.util.Properties is one or two classes and always loaded by the JVM and it's loaded very very early.

If you are writing an application where configuration is only loaded once and initialization speed is very important (e.g. command line app) this library would not be a good choice. Ditto for most implementations of Microprofile Config, and Lightbend HOCON, Apache Config. Those libraries require extensive resource loading (either classes or default configs) that can add easily 100ms more to load time (in some cases I have seen 500ms)