markg added a comment.

  In D10742#218171 <https://phabricator.kde.org/D10742#218171>, @dfaure wrote:
  
  > Can someone explain to me how switching from pointers to values is making 
anything faster, or is a first step towards making anything faster? This step 
in itself can only make things slower due to more "copying" (refcount updating).
  
  
  I don't know what the ultimate goal of @jtamate is here (speeding things up, 
that i do know).
  But in general, putting something on the stack (aka, no new) is measurable 
faster. For small objects and in small quantities that doesn't matter much. But 
for large objects (KFileItem is large) and in large quantities (also fitting 
for KFileItem) it could very well be a nice speedup!
  
  The other side of this optimizing story is copies where you don't intent them 
to happen but they just do. For instance, a std::vector<KFileItem> allocates a 
bunch ahead of time and then copies it in. Or moves since my move semantics 
commits and where applicable. If this were a std::vector<KFileItem *> you'd had 
no such copy or move.
  
  Back on this patch. It might allow faster routes, but it really depends on 
@jtamate next plans here if the current patch is worth it.
  Sounds like we need more info :)

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D10742

To: jtamate, #frameworks, dfaure
Cc: markg, michaelh

Reply via email to