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

Re: GNOME new file selection dialogs



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.

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature


Reply to: