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

David Faure dfaure at klaralvdalens-datakonsult.se
Sun May 25 23:39:39 CEST 2003


On Sunday 25 May 2003 21:11, Maks Orlovich wrote:
> 
> > within a single KIconViewItem::calcRect()). The other option, of course, is
> > to try to figure out why multiple updateItemContainer calls are so slow.
> 
> The reason is that once an item has been inserted once, calling 
> QIconView::updateItemContainer() will call removeRef() on a QPtrList 
> with lots and lots of items (I suspect nearly all, but I am not sure, that 
> class could use a few overly verbose comments; this might mean KIconView is 
> going quadraric, which would explain the horrible times); this makes me think 
> that the data structure choice is inappropriate, but that's probably not for 
> me to try to figure out how to fix that. 
I see.

> At any rate, for the case of  
> creating new items, the patch below does wonders (getting us into the 7-10 
> second range without modifying KIconView), 
Excellent!

> but it's really just a  
> special-case fast path. 

It wouldn't be the first one though. It's the easiest way to optimize - add checks
at the low level instead of redesigning the upper levels.

Did you send this patch to TT?

-- 
David Faure -- faure at kde.org, dfaure at klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions


More information about the Kde-optimize mailing list