Permissions mangling needs some serious Frank Sinatra style loving
|Reported by:||gcooper||Owned by:||jhixson|
The way things are done in the permissions setting stuff can be improved with a minimal number of lines of code to be faster/smarter. I've gotten a ton of complaints from users/customers about this being slow, and the reason why is that it's horribly serialized (even though filesystems in general aren't) and uses a brute force method for applying permissions.
My thoughts on how things should be done:
- If I don't change permissions, it shouldn't do anything.
- If I change the mode, it should change everything.
- If I change the owner/group, it should run chown.
- If I change the ACLs type, it should set the ACLs via setfacl.
[*] A force button should be added, just in case someone _wants_ to do an operation.
Furthermore, some profiling needs to be done to determine where the exact root issue lays, because even though the current code is serialized, it typically eats up a single core doing filesystem operations via python (!). My hunch is that it's because setfacl is being called by subprocess _a lot_ and there's a lot of jumping up and down class methods (e.g. busy work) instead of everything being written out to a file and then batched through setfacl -M . That's just a WAG though.