[performance] Re-arranging maps in config metadata improves startup time
aleksey.shipilev at oracle.com
Thu Mar 15 05:03:16 PDT 2012
This is rather simple and straight-forward optimization:
Please take a look. I'd be happy to see this patch landing in Jigsaw
code (are there any other steps besides preparing webrev?).
The change rearranges the hugest map from Map<String(ClassName),
ModuleId> to Map<ModuleId, String(ClassName)> when writing to config
datafile. This helps because module ID is de-duplicated, so it both
occupies less space, and module IDs are not resolved multiple times
The effect of this is clearly visible on "Hello World" applications:
BASELINE: 570 +- 20 ms
PATCHED: 240 +- 20 ms
...which converts to 2.3x improvement. After this patch, loading config
file takes ~30ms. I'm looking if this could be trimmed down further.
More information about the jigsaw-dev