[PATCH] ported kurlcompletion.cpp!DirectoryListThread::run() to use Qt APIs

Michael O'Shea michael.a.oshea at gmail.com
Fri May 2 22:52:15 BST 2008


David,


> On Thursday 24 April 2008, Michael O'Shea wrote:
> > The patch replaces all directory and file information function calls
> > (readdir_r, ?KDE_stat, etc) with Qt functions in method void
> > DirectoryListThread::run() in kdelibs\kio\kio\kurlcompletion.cpp
>
> The main concert is going to be performance, did you profile it before and
> after?


Since, in kurlcompletion.cpp, a worker thread is spawned specifically to
scan the contents of a directory in (what I'm guessing is) a non-blocking
manner, I figured that performance wasn't really an issue. Being very n00b
to this, I could be very wrong.

If I'm right, the only thing that will vary is how quickly the dropdown list
in Dolphin (in the case I'm interested in) fills up.

currentDir.entryInfoList() seems costly for large directories, maybe
> QDirIterator is better?
>

I don't mind giving it a try but would you agree that the asynchronous mode
of operation in kurlcompletion.cpp makes the distinction not so important ?

If I'm missing something, please share and I'll be happy to learn.

Cheers,

Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080502/c84e1e59/attachment.htm>


More information about the kde-core-devel mailing list