<table><tr><td style="">brauch created this revision.<br />brauch added reviewers: kfunk, mwolff.<br />brauch set the repository for this revision to rKDEVPLATFORM KDevPlatform.<br />Restricted Application added a subscriber: kdevelop-devel.
</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/D3042" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>The idea that because one file with extension X has mime type A,<br />
determined by its contents, hence other files with extension X will<br />
have the same mime type is just wrong. One common example where this<br />
breaks in a spectacular way is CMakeLists.txt and the .txt extension.</p>
<p>I found the claim that looking into each file will make the application<br />
unresponsive to be unfounded. QMimeType will only read the first 16kB to<br />
guess the mime type, which takes less than a millisecond for each file.<br />
A test project with three hundred 3 MB binary blobs still loads instantly.<br />
If, in comparison, we parse one of the files as CMake erraneously, we<br />
take multiple seconds.</p>
<p>CCBUG:363269</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>rKDEVPLATFORM KDevPlatform</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D3042" rel="noreferrer">https://phabricator.kde.org/D3042</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>shell/languagecontroller.cpp</div></div></div><br /><div><strong>EMAIL PREFERENCES</strong><div><a href="https://phabricator.kde.org/settings/panel/emailpreferences/" rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br /><div><strong>To: </strong>brauch, kfunk, mwolff<br /><strong>Cc: </strong>kdevelop-devel<br /></div>