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

[REG 5.2->5.3] Windows: Drawing rotated ellipses is very slow with QPainter in QPrinter environment.

    XMLWordPrintable

Details

    • cf5e49681399c94b996a7b8b9299177361d926c1 (5.3. branch , 21.7.2014, 5.3.2)

    Description

      There are some performance issues with QPainter printing to some device (large plotter).

      Paper size: A0
      Resolution: 600 DPI

      We set clip area with setClipRect() and than we set transformation which translates and rotates coordinate system according to ellipses major and minor axes. We draw some ellipses with above options and this is very slow because it creating temporary clipping region out of our initial rectangle and this clipping region made out of 27000 clipping sub-rectangles and it looks like they are created and destroyed for every single ellipse.

      We are using QPainter::drawPath(), QPainterPath::arcMoveTo() and QPainterPath::arcTo() functions. It was working fast in Qt 4.7.4 environment.

      Please see the attached printerperformancetest_v1.zip test program.

      Qt 4.8.6
      
      Printing ellipses: 2073ms
      Printing ellipses: 330ms
      Subsequent results: ~ 250ms
      
      Qt 5.3
      
      Debug
      Printing ellipses: 34269ms
      Printing ellipses: 34528ms
      Printing ellipses: 34788ms
      
      Subsequent results: ~ 34000ms
      
      Release
      Printing ellipses: 14933ms
      Printing ellipses: 16016ms
      Printing ellipses: 15683ms
      
      Subsequent results: ~ 15000ms
      

      Noticeable for paper size A4 already, only in Native/PS format (-0). It is fast when using PDF (-p).

      Attachments

        1. printerperformancetest_v1.zip
          2 kB
        2. qtbug40068_52.log
          6 kB
        3. qtbug40068_53.log
          8 kB
        4. qtbug40068_diag53.diff
          4 kB
        5. qtbug40068.zip
          3 kB

        Issue Links

          For Gerrit Dashboard: QTBUG-40068
          # Subject Branch Project Status CR V

          Activity

            People

              kleint Friedemann Kleint
              leonlee Leonard Lee
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes