[Thunar-dev] Slow media

Benedikt Meurer benedikt.meurer at unix-ag.uni-siegen.de
Sat Jul 16 11:34:32 CEST 2005


Wit Wilinski wrote:
>> The major problem with /usr/bin or /usr/local/bin is that the MIME
>> code has to open, read, close nearly every file, because the
>> filenames usually don't contain any known suffixes.
> 
> Why not analyze the way KDE does it? In gtk loading /usr/bin takes
> several seconds (with GUI not redrawn), KDE shows files instantly
> (lazy loading). I don't know how this is implemented, but maybe it'd
> be sufficient to just 'copy' this behaviour?

Well, that's quite easy. The KDE applications requests a 'file' 
I/O-slave from the I/O scheduler and asks the slave to load the entries 
for a given directory. Since the I/O slave runs in a different process, 
the main application doesn't block (but on the other hand doesn't do 
anything useful, because its waiting for the directory data). This is 
pretty expensive and slow for local files, tho.

Dunno what you did to your Gtk+ or KDE, but from my tests, KDE takes 
longer to load directories from cold cache than does the GtkFileChooser 
default implementation. Thunar takes even less time.

Benedikt



More information about the Thunar-dev mailing list