[Development] Fixing file dialog performance on Windows

Sérgio Martins sergio.martins at kdab.com
Wed Mar 20 18:47:01 CET 2013


Hi,


The file dialog takes up to 30 seconds to be usable if we're listing
files on a USB or remote share with 10k files.


The bottlenecks are QFileIconProvider::icon(const QFileInfo &info) and
QFileInfo::isSymLink().


I solved the icon problem by looking them up in the registry, by
extension, and caching them.


For the isSymLink() issue, I discussed with fkleint and rittk and we
kind of agree that we should simply check if the file extension is
.lnk, instead of calling GetFileAttributesEx.


The Windows native file dialog does not resolve NTFS symlinks, only
.lnk, so we would be consistent with it.


Any objection?



Regards,
--
Sérgio Martins | sergio.martins at kdab.com | Software Engineer
Klarälvdalens Datakonsult AB, a KDAB Group company
Tel. Sweden (HQ) +46-563-540090 [2], USA +1-866-777-KDAB(5322)
KDAB - Qt Experts - Platform-independent software solutions




More information about the Development mailing list