Understanding JUCE Drawing
Rules for Measurable Performance Improvements
This session provides a hands-on approach to optimising JUCE GUI performance through interactive demonstrations with measurable before-and-after performance comparisons.
We'll focus on three key optimisation topics:
1. Component hierarchy
In this section we'll dive into the details of how JUCE traverses components while drawing, taking a look at some of the ways you can influence this using setOpaque, setPaintingIsUnclipped, and setBufferedToImage. We'll also discuss the "leaf node only" drawing pattern to see how it can help avoid some surprising performance pitfalls.
2. Paint function
We'll look at Paths, Transforms, Text rendering with GlyphArrangement, and some useful caching techniques, to see how we can reduce the workload required in each of our paint calls.
3. Platform-specific
Finally we'll explore the strategic use of platform-specific optimisations such as setBackupEnabled for transient image caching in the Windows Direct2D renderer, and discussing when you should and shouldn't enable JUCE_COREGRAPHICS_RENDER_WITH_MULTIPLE_PAINT_CALLS on macOS.

Anthony Nicholls
Software Engineer
JUCE
Anthony is the most recent member to join the team developing the JUCE C++ framework. Having been passionate about music technology from a teenager, Anthony has worked in live sound, recording studios, and on plugins and applications for companies such as Sonnox and Focusrite.