Slows starting of downloading with KIO

David Faure faure at kde.org
Tue Dec 20 09:56:01 GMT 2005


On Tuesday 20 December 2005 10:44, nf2 wrote:
> David Faure wrote:
> 
> >  
> >
> >>Stupid question: does a recursive listing require stating in KIO?
> >>    
> >>
> >Yes and no (the question doesn't make sense from a KIO point of view :)
> >Listing calls listDir(), stating calls stat(), so technically listing is not stating.
> >However in practice for FTP, stating means listing and extracting one line from it,
> >so both operations are similar, except listing is done in one go, and stating is
> >done for every url so it's slower.
> >
> >  
> >
> Does that mean that kio-ftp has to list the whole directory for every 
> stat call?

Not really. It used to be that way, but I improved that long ago.

Let's see how it is now... Ah, yes:
First we try to CWD there, to know if it's a dir or a file.
If it's a directory, then we're done.
If it's a file, then we use "LIST filename" to stat it (to get the size, ownership, whether it's a symlink etc.).

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list