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

Degenerated performance of QFile::copy

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.0.1
    • Core: I/O
    • None
    • Linux/X11

      When migrating from Qt 5.15 to 6.0 we encountered a severe performance decrease in QFile::copy. While copying large files with QFile took about the same time as the command line cp, the Qt 6.0.1 version takes more than 10 times to finish its work.

      Here are the results from a test program you can find attached:

      (Test.aaf is a 1,3 GB zip file.)

      $ rm test.aaf
      $ ./copy input.aaf test.aaf
      Qt: 6.1
      copying input.aaf to test.aaf
      copying took 8229 ms

      $ rm test.aaf
      $ ./copy input.aaf test.aaf
      Qt: 5.15
      copying input.aaf to test.aaf
      copying took 656 ms

      For comparison, cp on the command line:

      $ time cp input.aaf test.aaf

      real 0m0,697s
      user 0m0,003s
      sys 0m0,690s

      Is there any change to speed up the QFile::copy method?

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

            thiago Thiago Macieira
            mlangen Marc Langenbach
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes