Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-108891

Add a way to clear glyph cache

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.10, 6.4.1
    • Quick: SceneGraph
    • 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

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            xavierbesson Xavier Besson
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes