Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.10, 6.4.1
-
None
Description
When using QtTextRendering (Qt 5.15.10) for a customer's app, there is an increase of memory each time we change the language to a new language and all the bindings are updated (classic https://wiki.qt.io/How_to_do_dynamic_translation_in_QML). If we change back to a previous language there is no increase.
Using QML Profiler, I see the scenegraph Glyph Render and Glyph Upload are consuming resources, but why aren't previous resources released ? Is there some way to force their release ? Because memory usage increases 5Mo by 5Mo at the moment.
When using NativeRendering, there is no increase at all but some texts are ugly.
esabraha:
In Qt 5.15, there is unfortunately no way of doing this as far as I can see. It will keep the glyph caches until the scene graph is destroyed.
In more recent Qts (since 6.4 I think) it will clear all unused caches when the font database updates, so it should be possible to hack it by emitting QGuiApplication::fontDatabaseChanged(). Not exactly nice, but I think it should work.
It would be nice to have a proper way to clear the glyph cache