[PATCH] New KFileItem::assign() for Optimizing KDirListerCache

Michael Brade brade at kde.org
Fri Mar 25 14:41:30 GMT 2005

On Friday 25 March 2005 15:27, David Faure wrote:
> > But I don't use it to update the item (which can also be confused with
> > refresh) but rather to make it an entirely new item... The method is a
> > shortcut for 'delete item; item = new KFileItem( udsEntry ... );'.
> This sounds a bit weird :)
> I mean, for any other class you wouldn't have a method for doing that, you
> would just do *item = KFileItem( udsEntry... );
> No new/delete there, only an instance created on the stack, and a call to
> the assignment operator.
Well yes, but I think that would still be slower than "updating" the item 
in-place, no? With the new setUDSEntry not even the instance on the stack is 
needed, no CTOR call at all.

Michael Brade;                 KDE Developer, Student of Computer Science
  |-mail: echo brade !#|tr -d "c oh"|s\e\d 's/e/\@/2;s/$/.org/;s/bra/k/2'
  °--web: http://www.kde.org/people/michaelb.html

KDE 3: The Next Generation in Desktop Experience
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20050325/8aede091/attachment.sig>

More information about the kde-core-devel mailing list