Java Class Metadata: A User Guide [Presentation]
Check out these slides and video from FOSDEM that cover Java class metadata, how to measure it, and how to reduce its footprint on your app.
Join the DZone community and get the full member experience.Join For Free
- What Java Class Metadata is
- Why it helps to know about it
- What you might do to measure it and reduce the impact of the metadata’s footprint on your Java application
The “too long — didn’t read” summary is:
- It’s the model of the loaded class base that Java retains at runtime in order to dynamically load, link, JIT compile, and execute Java code.
- Different design choices you make when writing your code can significantly expand or contract the amount of metadata Java needs to retain.
- The JVM can give you a breakdown of metadata storage costs for individual structures that model each loaded class, allowing you to weigh and compare the costs of alternative designs.
The video of the talk has been put online by the FOSDEM team. It was limited to 25 minutes, which is enough to get you started, but not enough to explain how to do really fine analysis and tuning. As promised at the start of the talk, I have now published the FOSDEM slides plus the original 4 articles from which the talk was derived. The articles provide an introduction to the topic along with a detailed explanation of how to measure and analyze the JVM stats. Example analyses are included based on the Wildfly code base along with full reference materials listing all of the available stats with advice on how to interpret them.
Please check it out!
Published at DZone with permission of Andrew Dinn, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.