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

QFileDialog extremely slow on Windows (XP)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 4.7.0, 4.8.3
    • Fix Version/s: 4.8.x, 5.1.0
    • Labels:
      None
    • Environment:
      Windows XP - no probs with Linux-variant (Mac??), Mac OS X, Windows 7, Solaris

      Description

      QFileDialog is extremely slow on any QT (@Windows XP). I can see that it is a bit faster in release-builds than debug - but still very very slow.
      Try the code. Don't forget to visit
      c:\windows\system32
      (or where this folder is on your system). Notice that other folders can contain many more files.

      Under Linux I can browse (the same folders) a lot faster on the same files (through share (samba)). It is acceptable fast - but I did see a 'render bug' once.
      (By render bug I mean that you paint while the files are updated - I would suggest that if you can't fetch in the right order then wait with the painting. Don't paint/update. In Windows I can move my mouse to an object and (almost) click at it and then 10-20 new icons appear - and the one I wanted to click on has moved.)

      The Windows version of QFileDialog seems to be something like a factor 15 (1500%) slower than the Linux-version.

      I know I can use the static functions (and get the native Windows dialogs and I probably will) but I see no reason for QFileDialog to be that slow on Windows. With QT I could program a far faster filedialog myself.

      (Just showing the dialog is also somewhat slow ...)

      void browseLogFolder()
      {
        QFileDialog fd;
        if (fd.exec()==QDialog::Accepted)
        {
          QStringList res = fd.selectedFiles ();
          if (res.count()==0)
            return;
          qDebug() << res[0];
        }
      }
      
      void thisIsFastButNotAsPowerFull()
      {
        QString res = QFileDialog::getOpenFileName(0,"select something");
        qDebug() << res;    
      }
      
      int main(int argc, char *argv[]) 
      {  
        QApplication app(argc, argv); 
        browseLogFolder();
        return 1; 
      }
      

        Attachments

        1. folders4_2.diff
          3 kB
        2. folders4.diff
          2 kB
        3. qfsfileengine_win.cpp_patch
          6 kB

          Issue Links

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

            Activity

              People

              Assignee:
              tjenssen Tim Jenssen
              Reporter:
              tlm Thorbjørn Martsum
              Votes:
              37 Vote for this issue
              Watchers:
              39 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes