Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-28892

SubDirFileIterator is slower about 20 times comparing to QDir::entryInfoList() done recursively

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Not Evaluated
    • Qt Creator 12.0.0
    • Qt Creator 10.0.0-beta2
    • All Other Issues
    • None
    • Linux/X11
    • 686a40d19 (master), 29811f81d (master)

    Description

      It looks like SubDirFileIterator is slower about 20 times comparing to QDir::entryInfoList() when done recursively in case many files / dirs are being iterated. I've set homePath to path where I have about 1.5 million files and about 200 K dirs. Modify this path accordingly when verifying the code below: https://codereview.qt-project.org/c/qt-creator/qt-creator/+/476058

      My output:

      QDEBUG : tst_filepath::iterator() SubDirIterator: Elapsed 171247 ms, count 1426482
      QDEBUG : tst_filepath::iterator() EntryInfoList: Elapsed 13239 ms, count 1425253 dir count: 193131
      

      Side note: not sure why the number of files differ in both cases.

      Attachments

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

        Activity

          People

            jkobus Jarek Kobus
            jkobus Jarek Kobus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes