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

QFontMetrics unusable in multithreaded applications

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 5.15
    • GUI: Font handling
    • None
    • Linux/X11

      When QFontMetrics class methods (and maybe a lot of more stuff as the problem goes down to QFontPrivate) are used in an multithreaded environment (for example using QtConcurrent), there is a font database (re)load on every thread context switch! At least on Linux/X11 this is extremely slow and makes the application perform by orders of magnitude slower than without multithreading.

      The root of the problem is QFontPrivate::engineForScript(int script) const, respectively the global QFontCache it uses and drops on every thread context switch.

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

            esabraha Eskil Abrahamsen Blomfeldt
            tumic Martin Tůma
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes