Using Java Reflection to Debug Performance Issues, featuring Dr. Heinz Kabutz

This is a past event

33 people went

Promálaga UrbanLab

C/ Concejal Muñoz Cerván, 3. · Málaga

How to find us

Será en el módulo 5 del edificio de La Tabacalera, dentro de las instalaciones de ProMálaga Urban Lab

Location image of event venue


It's our pleasure to announce Dr. Heinz Kabutz for our next meetup. He'll be in town for a few days, and he told us, he'd be delighted to meet with the local Java enthusiasts.

If you've been living in another planet for the last decade or so, Dr. Kabutz is one of the most renowned Java Champions. He travels the world doing some Java consultancy and trainings, but he loves his home island Crete, where he organizes the best Java un-event ever: JCrete[1]. He also writes the Java Specialists newsletter[2], read by tens of thousands of programmers in over 135 countries.

So, without further ado, here's the abstract!

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.

So, be there or be square!