JUCE 8.0.2 - GlyphArrangement slow in Debug builds

For our plugins and other GUIs, we have built our own help tooltip framework that uses read-only TextEditors to automatically size the tooltips. Some help tooltips can have up to three ‘pages’ of information, so up to three TextEditor components which are sized shortly after construction.

Since JUCE 8.0.2 and the deprecation of Font::getStringWidth, the GlyphArrangement equivalents have been used throughout the modules. This change in particular makes it so that the help tooltips make our debug GUI builds hang for about 11 seconds on load, vs less than a second before (depending on the number of tooltips):

I replaced the TextEditors in the help tooltips with GlyphArrangements and used addJustifiedText() to get the same if not better end result, but instead hangs for 4 seconds. This is still much longer than we would like though.

As this only affects debug builds, it’s only going to be an issue for us during development. Aside from spending time to change our approach completely (to perhaps only perform the tooltip sizing and text justification when the tooltips become visible, not on load, for example), are we missing a trick somewhere? Is this considered a bug with the framework that could be fixed?

The TextEditor class is undergoing a rewrite in order to fully utilise the new Unicode capabilities.

The current implementation does a lot of text layout work, that GlyphArrangement::getStringWidth also does, and I expect this will be streamlined in the new version. So there is a good chance for performance improvement.

1 Like