[Differential] [Request, 36 lines] D3042: Remove mime type <-> extension cache
brauch (Sven Brauch)
noreply at phabricator.kde.org
Wed Oct 12 21:07:34 UTC 2016
brauch created this revision.
brauch added reviewers: kfunk, mwolff.
brauch set the repository for this revision to rKDEVPLATFORM KDevPlatform.
Restricted Application added a subscriber: kdevelop-devel.
REVISION SUMMARY
The idea that because one file with extension X has mime type A,
determined by its contents, hence other files with extension X will
have the same mime type is just wrong. One common example where this
breaks in a spectacular way is CMakeLists.txt and the .txt extension.
I found the claim that looking into each file will make the application
unresponsive to be unfounded. QMimeType will only read the first 16kB to
guess the mime type, which takes less than a millisecond for each file.
A test project with three hundred 3 MB binary blobs still loads instantly.
If, in comparison, we parse one of the files as CMake erraneously, we
take multiple seconds.
CCBUG:363269
REPOSITORY
rKDEVPLATFORM KDevPlatform
REVISION DETAIL
https://phabricator.kde.org/D3042
AFFECTED FILES
shell/languagecontroller.cpp
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: brauch, kfunk, mwolff
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20161012/87320e1e/attachment.html>
More information about the KDevelop-devel
mailing list