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

Loading QPrinter class slows down application startup

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.9.1
    • GUI: Printing
    • None

    Description

      Reporting this upstream coming from a downstream discussion on the slow startup of Ghostwriter which is a Qt5 text editor. Quoting the recent finding from the discussion and would appreciate any feedback from you. Thanks!

      Having played around a bit with Fedora 27 in a VM, I have narrowed down the culprit to be the Qt 5 printer support library and loading its QPrinter class. In fact, I had to completely strip all the printing / print preview code in ghostwriter before launching became 100% snappy.

      Note that this is not happening on my Linux Mint 18 Cinnamon machine, nor on my Mint 18 KDE machine. Also does not happen in VirtualBox on other distros (Antergos, Solus). I think this is largely either a Fedora packaging/compilation thing of whatever Qt 5 package has the printer support in it, or else something that is a Qt bug that mostly appears only on Fedora. (I did see the post up above regarding it happening on Ubuntu. Very bizarre, as I am running the same base just fine.)

      I am hesitant in the meantime of stripping printing support from ghostwriter at this time. (Although it is tempting since it behaves so finnicky on the way it prints on different platforms!) While I did strip it on the latest release from the HTML preview, that was only in anticipation of the switch to QtWebEngine, which does not support printing to a printer at this time. I'd like to keep at least the plain text print support if at all possible.

      I recommend someone file a bug report against the Qt 5 printer support either in the Fedora bug tracker or in the Qt one (or both!). Something is fishy somewhere, but I lack the know-how of the deeper Qt arts under the hood to determine what went wrong.

      Source: https://github.com/wereturtle/ghostwriter/issues/315#issuecomment-381364471

      Attachments

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

        Activity

          People

            johnlayt John Layt
            orschiro Robert Orzanna
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes