multifilesystem: Improve performance of PROPFIND

The PROPFIND does not need to check the filesystem for the file existence,
because the list comes from the directory listing, similar as the other
parts already do it. That was highly visible with large collections (10k+ items),
causing massive delays.

Also avoid repeated stat() calls on the same path.
This commit is contained in:
Milan Crha
2026-08-07 12:22:22 +02:00
parent 86fd5e8aa5
commit dc2a6ac1d7
5 changed files with 52 additions and 5 deletions

View File

@@ -88,7 +88,9 @@ class StoragePartDiscover(StorageBase):
for href in collection._list():
with child_context_manager(sane_path, href):
item = collection._get(href)
# We don't need to check for collisions, because the file
# names are from _list() (os.scandir).
item = collection._get(href, verify_href=False)
if item is not None:
yield item