<table><tr><td style="">meven 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/D24773">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/D24773#554409" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D24773#554409</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;">@dfaure</a> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"><p>You can do whatever you want in the GUI -- I'll happily step out of that part of the discussion --, as long as you don't abuse UDS_SIZE for what it was not meant for, thus creating an ambiguous meaning for it.</p>

<p>My suggestion would be to add a UDS_RECURSIVE_SIZE instead.<br />
 The problem with that, however, is that the kioslave can't know if the application actually wants the information. So in most cases we would be wasting a lot of time for nothing -- even here it's not fully for free.</p></div>
</blockquote>

<p>Some ioslave could provide it by default in some situation like for kio_trash, this make sense for /.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>One solution would be to use the "details" metadata for this.</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">0 (as set by DeleteJob) means bare minimum (filename and type).</li>
<li class="remarkup-list-item">1 isn't used anymore, but it adds uid, gid, atime, mtime, btime</li>
<li class="remarkup-list-item">2 is the default, which is the above plus ACL data</li>
<li class="remarkup-list-item">3 requests in addition the device and inode number (from kio_file), so that DirectorySizeJob can check for hardlinks</li>
<li class="remarkup-list-item">we could add that 4 means "I want UDS_RECURSIVE_SIZE too".</li>
</ul></blockquote>

<p>Good idea, could be a base to fix <a href="https://bugs.kde.org/show_bug.cgi?id=158090" class="remarkup-link" target="_blank" rel="noreferrer">https://bugs.kde.org/show_bug.cgi?id=158090</a> later.</p>

<p>This <tt style="background: #ebebeb; font-size: 13px;">KIO::stat</tt> details parameter begs to be a bitmask...<br />
I am thinking about adding a KF6 TODO about this.</p>

<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>I don't know if this will be useful in any other kioslave, but at least here it would allow skipping this stuff when not needed.</p>

<p>Sample code, like in kio_file and kio_ftp:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">const QString sDetails = metaData(QLatin1String("details"));
const int details = sDetails.isEmpty() ? 2 : sDetails.toInt();</pre></div></blockquote>

<p>All dependent of the implementations and the users.<br />
But for sure UDS_RECURSIVE_SIZE cannot be a default.</p>

<p>About <a href="https://bugs.kde.org/show_bug.cgi?id=158090" class="remarkup-link" target="_blank" rel="noreferrer">https://bugs.kde.org/show_bug.cgi?id=158090</a><br />
I would imagine something where the job recurse at most N levels, or M number of directory before stopping with N = 4 and M = 300.<br />
Returning incomplete results, but enough to give good information in most usercases.</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/D24773">https://phabricator.kde.org/D24773</a></div></div><br /><div><strong>To: </strong>meven, Frameworks, ngraham, elvisangelaccio, dfaure<br /><strong>Cc: </strong>kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns<br /></div>