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

QFontMetrics unusable in multithreaded applications

    XMLWordPrintable

Details

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

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes