Improve performance of path_to_filesystem()#2002
Conversation
|
flake8: commands[0]> flake8 . -> please improve your PR, see also https://github.com/Kozea/Radicale/wiki/Development-Testing-Release |
|
Haven't tested it yet but thanks for this @flesueur. I was running into this bottleneck when I was debugging another issue and was going to have a look into the performance degradation later- glad that now I don't have to. |
Remove unused variable safe_path_parent
have fixed this now inline |
Refactor path collision check for readability.
|
Sorry I was offline during this weekend. Thanks for having cleaned this PR ! |
When using radicale with a large set of accounts, the
PROPFINDrequest at/, even with simpleowners_onlyaccess rights, is very long (more than 100 seconds with 100% CPU on my test).The bottleneck seems to be in the function
path_to_filesystem()which is called for every folder (so for every account, when listing/), more precisely in the part in which it lists again this large folder.This patch aims to check the same cases (short names on windows and case-insensitivity) with a different approach. In my test, the
PROPFINDat/goes from 120 seconds to 3 seconds.