Originally posted by Weasel
View Post
Announcement
Collapse
No announcement yet.
EXT4 Getting Faster Case-Insensitive Performance
Collapse
X
-
Originally posted by Weasel View PostInvalid point. Nobody forces you to use it or enable it on the directory.
You want a simple argument for it? Wine performance.
So really it a case we need both. One or the other does not cut it.
There has been a lot of history stubbornness over case insensitive and case sensitive with the stupid logic that you have to choose 1 or the other absolutely when correct answer is create a system that provide both solutions.
Both windows 10 and Linux are going the per folder route for choosing if you are case insensitive or case sensitive it seams like the right option.
Comment
-
Originally posted by xfcemint View PostNot true.
While it can be done in a couple of lines, the actual code for this is at least 10 times bigger than the normal "file open", and prone to errors.
The real problem is that such a code is extremely slow.
Only applications actually having issues with that are Samba and Wine stuff. But there is no reason to do that with a new application.
I didn't say that. Nothing even close. I am arguing that "case-insensitive" handling is better. I didn't say anything about forcing it on anybody. The solution with per-directory preference is quite acceptable to me.
Reminds me of some shit Windows applications that require the user to set Windows system folder to world writable to work at all.
1. Not true for Wine and similar apps.
2. Irrelevant argument. We are arguing what's better, not whether there will be an immediate performance impact.
No, you are not.
Of course you never said it. You just implied it.
I implied that if all current applications can do it you can do it too for your specific usecase and it will be fine.
Comment
-
Originally posted by xfcemint View Post1. FS Driver has additional information and privileges that user-space apps and libraries don't have, therefore enabling for a more efficient implementation.
Filling this hash table with casefolded make a case-insensitive search more effective at the file system level and the hash table is shared between processes so does not have to be started every time and some file systems allow you to save the hash table in the file system metadata between runs.
Remember casefolding the look-up request is not free so case-insensitive always has more overhead than case-sensitive.
Originally posted by xfcemint View Post2. It is easier to turn a case-insensitive file search into a case-sensitive than vice-versa.
About time you look at the patches. To turn case-insensitive file search into a case-sensitive you basically have to reverse the above patch.
The problem is the filename lookup hash what is is filled with.
A pure case-sensitive search is always faster than a case folded case-insensitive search. Turning a case-insensitive search into a case-sensitive one adds extra processing.
Basically you are better to start with a case-sensitive search and extend it to include case-insensitive than attempt to convert a case-insensitive search into a case-sensitive one.
Please also note a directory really cannot be both case-sensitive and case-insensitive at the same time as this leads to conflict issues on what is and is not allowed.
- Likes 1
Comment
-
Originally posted by starshipeleven View Post
Another guy seeing thigs that are only in his own mind.
This is a filesystem feature that is needed by one of the possible usecases. Like Samba shares, or Wine application folders.
It's not on by default and it's specifically designed to be enabled on a folder basis.
Ironically Windows went the other way. They have have Linux APIs that makes it possible to store files that otherwise would name clash with normal Windows APIs.. NTFS have always been able to handle both, it is just different APIs.
Comment
-
Originally posted by xfcemint View PostCase-sensitive comparison is equally fast as case insensitive (more precisely, the difference is negligible when used in file-system operations.
No case-sensitive comparison at file system driver level is in fact slower than case-sensitive you have a longer code path. If what you are doing is like a Linux kernel build having the file system folder where it is as case insensitive does hurt by taking longer.
Originally posted by xfcemint View PostIt is not fine (to emulate case-insensitive file-open by retrieving a list of all files in a directory) because:
- it is slower
- it requires extra code and testing
Originally posted by xfcemint View Post- requires code duplication
Originally posted by xfcemint View Post- requires extra error checking, memory allocation and other things which experts know very well about, but amateur's don't
- requires extra case handling (when two synonymous files exist in the same dir).
Bugs in file system means two synonymous files may exist so true at kernel level.
Originally posted by xfcemint View Post- etc, etc...
Originally posted by xfcemint View PostIn short, it is not fine because it is not an elegant solution. An elegant solution is to provide this functionality on the kernel level.
The advantage of implementing case insensitive in kernel space is avoiding some duplication and race condition problems. The avoid some duplication increases performance but it does not change the fact that case insensitive processing is still slower than case sensitive processing even when in kernel space.
Case insensitive search is always a longer code path than a case sensitive one. The reason why Linux kernel developers resisted adding case insensitive support for so long is the fact it adds extra code into file system layer to be debugged and harms performance. Of course those emulating case insensitive in user-space being wine and samba were being hit worse.
Comment
Comment