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

QFontDatabase::findFont really slow on OS X

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P3: Somewhat important
    • None
    • 5.2.0
    • GUI: Font handling
    • None
    • Qt 5.2.0, clang 64bit, Mac OS X 10.9.1
    • macOS

    Description

      When starting a Qt application on OS X Mavericks, QFontDatabase::findFont is so slow, that the whole application takes at least a second to start up on my machine. As you can see in the attached screenshot, ~840ms of this second is spent directly in QFontDatabase::findFont.

      The problem is reproducible on my machine, by creating an empty "Qt Widgets Application" via QtCreator's New Project wizard.
      It is much more severe in applications which use QPainter::drawText a lot (e.g. 2.7 seconds in findFont alone).

      By the way: It is not at all important, from where findFont is called. In the attached screenshot it is QStatusBar, for other applications it is some QStyledItemDelegate or QLabel. This might suggest, that the first few calls to findFont are slow, or something else in this direction.

      Attachments

        Issue Links

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

          Activity

            People

              vestbo Tor Arne Vestbø
              kampfgnom Niklas Wulf
              Votes:
              3 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes