[Thunar-dev] thunar speed
Benedikt Meurer
benedikt.meurer at unix-ag.uni-siegen.de
Tue Mar 14 23:19:26 CET 2006
Jari Rahkonen wrote:
>>>I noticed the same thing.
>>>Opening my /usr/bin directory which contains about 2128 files took
>>>thunar about 20 seconds. Rox opened it in 3 seconds.
>>>
>>>Odd...
>>
>>For /usr/bin, that's the expected behaviour, and easy to explain. ROX
>>doesn't do magic lookups on the MIME database, while Thunar follows the
>>MIME spec (with one small exception) and does the magic lookup if none
>>of the glob patterns match. Since Linux binaries usually don't include
>>an extension, no glob patterns will match, and Thunar will have to open
>>each file and check the magic patterns. Looking into 2128 files for the
>>first time can take up to 20 seconds, depending on the systems I/O
>>performance.
>
> Would it be at all reasonable to only do the magic lookups for the files
> that fit into the initial view before showing them and then checking the
> rest in the background? Maybe this would make Thunar seem more
> responsive to the user.
Early versions of Thunar used to determine the mime type on-demand, but
this had several drawbacks, for example, the UI would freeze while
scrolling through a folder on a (possibly slow) remote file system.
The current implementation is optimized for the common case, where
folders contain mostly files, whose mime types can be determined from
the file name. This is what most users folders will look like.
> - Jari
Benedikt
More information about the Thunar-dev
mailing list