[Qt-interest] [Qt-embedded-interest] long-term delay for QDir::entryList(), QDir::count() for directory located on USB stick
Sean Harmer
sean.harmer at maps-technology.com
Wed Jul 1 15:36:49 CEST 2009
Hi,
On Wednesday 01 Jul 2009 14:29:37 Markus Franke wrote:
> I just figured out that the problem only occurs in case the cluster size
> of the FAT32 filesystem on the 4GByte USB stick is 4 KByte.
> If I change the cluster size to 32 KByte everything works fine.
> By the way, same applies for USB sticks from other vendors.
>
> Any comments on this?
First off, have you isolated the problem to be in the linux kernel's driver or
the Qt code or your code?
You can test to see if it is a kernel level problem by simply doing an ls in
your usb stick's filesystem and timing that. If that takes a long time the
first time that you run it, then it is a kernel/filesystem/hw problem. I
suspect that this is the case otherwise Qt would show this problem on other
file systems too. The reason it gets quicker on subsequent attempts is that
the files will already be in the kernel's memory resident disk cache so no
reading of the physical disk is required.
To work around it just use a different cluster size or a better file system.
Sean
More information about the Qt-interest-old
mailing list