<table><tr><td style="">markg added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D10742" rel="noreferrer">View Revision</a></tr></table><br /><div><div><blockquote style="border-left: 3px solid #8C98B8;
color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D10742#218171" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D10742#218171</a>, <a href="https://phabricator.kde.org/p/dfaure/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;" rel="noreferrer">@dfaure</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><p>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).</p></div>
</blockquote>
<p>I don't know what the ultimate goal of <a href="https://phabricator.kde.org/p/jtamate/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;" rel="noreferrer">@jtamate</a> is here (speeding things up, that i do know).<br />
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!</p>
<p>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.</p>
<p>Back on this patch. It might allow faster routes, but it really depends on <a href="https://phabricator.kde.org/p/jtamate/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;" rel="noreferrer">@jtamate</a> next plans here if the current patch is worth it.<br />
Sounds like we need more info :)</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D10742" rel="noreferrer">https://phabricator.kde.org/D10742</a></div></div><br /><div><strong>To: </strong>jtamate, Frameworks, dfaure<br /><strong>Cc: </strong>markg, michaelh<br /></div>