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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user