Dr Heinz Kabutz writes the popular "The Java Specialists' Newsletter" read by tens of thousands of enthusiastic fans in over 135 countries. To sign up, visit JavaSpecialists.EU.
23.05.2016
LOCATION: Zürich
KEYWORDS: Technology, Tools, Hands-On
AGENDA: | 18:15 - 19:30h: Talk incl. Q/A Afterwards you are invited to a refreshment. |
SPEAKER: Heinz Kabutz COMPANY: JavaSpecialists.EU
Java reflection allows us to peek inside objects that we don't know, find their classes and then call methods and set fields. Great, but how can we use this practically in the "real world"?
In this talk, we start by showing how we find performance bottlenecks in Java using a profiler. We check the profiler has found the mother lode by looking at the objects with reflection.
In our first example, we profile an open source tool that exhibited CPU bound performance issues. We discover a typical bad coding paradigm and use Java reflection to test whether this bottleneck could be eliminated with a better hashing mechanism.
Our second example is a look at the new Java 8 hash function inside HashMap. Debuggers hide the gory details of a HashMap from our prying eyes, so we use reflection to output the contents of the array of buckets. This shows us essential data about the effects of the new hash function. Java 8 HashMaps can perform 3x slower than previous versions! Using reflection we show why that is. This talk is mostly live coding, with a few slides explaining how we find performance bottlenecks quickly.
LANGUAGE: Talk: en / Slides: en
Dr Heinz Kabutz writes the popular "The Java Specialists' Newsletter" read by tens of thousands of enthusiastic fans in over 135 countries. To sign up, visit JavaSpecialists.EU.
JUG Switzerland aims at promoting the application of Java technology in Switzerland.
JUG Switzerland facilitates the sharing of experience and information among its members. This is accomplished through workshops, seminars and conferences. JUG Switzerland supports and encourages the cooperation between commercial organizations and research institutions.
JUG Switzerland is funded through membership fees.