[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: GNOME new file selection dialogs



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Joey Hess wrote:
> Michael Marsh wrote:
>> About 27s for me.  I type in the path and click "OK" for the 
>> small dialog that pops up when you start typing.  It's then 
>> about 27s before that dialog goes away and I can click "OK" on 
>> the actual file picker.
> 
> Ah. That delay actually occurs when the actual file picker (for 
> lack of a better term) displays the /usr/bin directory.
> 
> The amazing thing is what it's doing. This includes:
> 
> open /usr/bin getdents
> 
> for each file stat it (to get modification time?)
> 
> That's reasonable, and most programs would stop here with about 
> .2 seconds used. Although a non-generic "pick a program to use" 
> chooser shouldn't need to even care about getting modification 
> times, which would bring it down to more like 0.001 seconds used.
> 
> 
> 
> for each file open file use fstat on it (to get modification 
> time? again?) read 4k of file contents, apparently to determine 
> the file type to use in displaying various (identically 
> meaningless) icons
> 
> The second loop is the killer when it needs to read 3000 files. 
> Tens of thousands of system calls, and the disk seeking all 
> around to read some 12 mb of data. Pretty absurd indeed.

This is a generic file picker.  You'd have to code in some sort of
exception handler.  "if the directory is in $PATH, only care about
file names".

I hereby give you permission to file a wishlist bug.  :)

- --
Ron Johnson, Jr.
Jefferson LA  USA

Is "common sense" really valid?
For example, it is "common sense" to white-power racists that
whites are superior to blacks, and that those with brown skins
are mud people.
However, that "common sense" is obviously wrong.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEkK9ES9HxQb37XmcRAt+TAJwKacirkUExML/faWg8DJEuitcmHwCdF1CD
w4/6U8Inf6F1MoXHbZoF3Fw=
=RasU
-----END PGP SIGNATURE-----



Reply to: