[PATCH/RFC] On the iconview and the speed of directory listing.

Maks Orlovich mo002j at mail.rochester.edu
Sun May 25 15:19:37 CEST 2003


> > Ah, so the worse isn't the additional calcRect() call, but the actual
> > word-wrap implementation, KWordWrap::formatText()?
>
> Probably not, if you consider the case I patched. There, calling calcRect()
> twice seems to make the huge difference (more like 30x than 2x). I am not

Indeed. If I turn wrapping on, but crudely hack qiconview and kiconview to 
ensure that updateItemContainer() gets called only once, listing the 20K file 
test directory, with short testNNNN file names takes takes 6-8 seconds; 
and with exceedingly long test-with-long-file-name-and-excessively-soNNNN 
filenames take around 8-10 seconds, which is slower then the no-wrap case, 
but still a lot more reasonable than 90 seconds. 

On a related note, I don't see how we can get KIconViewItem's to pass 0 to the 
QIconViewItem ctor -- the current constructors are inline :-(. Perhaps 
KFileIVI can do something like that though. (And we would still need a 
setAllRects() to avoid triggering multiple updateItemContainer() calls within 
a single KIconViewItem::calcRect()). The other option, of course, is to try 
to figure out why multiple updateItemContainer calls are so slow. 





 


More information about the Kde-optimize mailing list