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

QDir::entryList and QDirIterator are very slow in a directory with many files compared to other non Qt methods

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 4.3.5, 4.4.3, 4.5.2, 4.6.1, 4.6.2, 4.6.3, 4.7.0, 4.7.1, 4.7.3, 4.7.4, 4.8.0, 5.1.1
    • Fix Version/s: 5.6
    • Component/s: Core: I/O
    • Labels:
    • Environment:
      Windows

      Description

      When trying to get the content of a directory with more then 10000 files there is a very noticeable performance issue, it appears that the complexity is O(N^2).
      This is true for both QDir, and QDirIterator.
      Using the windows API is faster in several orders of magnitude.

        Attachments

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

          Activity

            People

            Assignee:
            Eddy Edward Welbourne
            Reporter:
            fargoth fargoth
            Votes:
            6 Vote for this issue
            Watchers:
            8 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes