[Qt-interest] Antwort: Re: [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 16:05:05 CEST 2009
Hi,
On Wednesday 01 Jul 2009 14:56:20 you wrote:
> Well, I thought I isolated the problem. If I plug-in the device, it get's
> properly recognized and mounted by my hotplugging script.
>
> Strange. If I type an 'ls' command for the first time after plugging in
> the USB stick it is very fast. However, if I issue a 'df' command it's
> taking a very long time.
>
> Seems like you were right and it is a kernel level problem.
>
> Although it doesn't belong to this list: Does anybody have a suggestion
> how to fix this problem?
Options:
(i) Use a usb 2.0 device, bus and driver if you have them available.
(ii) Use a larger block size with VFAT. Is there any reason you really must
use a 4k block size?
(iii) Use a different file system. There are many alternatives to choose from
but it depends upon your project requirements.
(iv) Patch QDir::entryList() and QDir::count() so that they work as fast as ls
(if you are sure that ls is nto using cached results).
(v) Improve the kernel's VFAT driver to work better with small block sizes
over usb 1.1.
Good luck ;-)
Sean
More information about the Qt-interest-old
mailing list