<table><tr><td style="">bruns 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/D8532">View Revision</a></tr></table><br /><div><div><p>I totally agree with fvogt here - the extractors should just receive a readonly file descriptor.</p>

<p>For this, there are several steps required:</p>

<ol class="remarkup-list">
<li class="remarkup-list-item">let the extractors work with file descriptors (KFileMetaData)</li>
<li class="remarkup-list-item">make sure the extractor plugins are fully initialized before receiving file descriptors</li>
<li class="remarkup-list-item">actually feed file descriptors to the extractor</li>
</ol>

<p>(1.) is trivial for some extractors (e.g. taglib), for others it may be hard.<br />
(2.) depends on several things - the plugins must be instantiated early (which clashes with the lazy loading), and the plugin may not load any external resources later on.</p>

<p>Using file descriptors has another benefit - currently, the file is stat'ed and so on, and then the corresponding path is fed to the extractor. It would be much better to open the file, use fstatat and friends, run the extractor and close the file again.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R293 Baloo</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D8532">https://phabricator.kde.org/D8532</a></div></div><br /><div><strong>To: </strong>davidk, apol, ossi, Frameworks, smithjd, bruns<br /><strong>Cc: </strong>fvogt, mgallien, kde-frameworks-devel, michaelh, Baloo, detlefe, ngraham, nicolasfella, LeGast00n, domson, ashaposhnikov, astippich, spoorun, bruns, abrahams<br /></div>