Remove mime type <-> extension cache
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 Differential Revision: https://phabricator.kde.org/D3042
parent
9b98333b
Please register or sign in to comment