Files
seaweedfs/weed/server
Chris LuandGitHub 78ed665557 webdav: answer PROPFIND child stats from the listing (#10492)
* webdav: answer PROPFIND child stats from the listing

golang.org/x/net/webdav discards the FileInfo that Readdir returned and stats
every child again, five times over, so a PROPFIND on a directory costs five
sequential filer lookups per entry: 15006 lookups and 1.4s for 3000
subdirectories, 24s for 60000. Windows Explorer times out well before that.

Hold the entries a listing already fetched for the lifetime of the request and
serve those stats from them - 6 lookups and 0.03s for the same 3000 entries.
WebDavFile.Stat has to stop dropping its request context for the held entries
to be reachable.

* webdav: keep the request context on the lookups a listing drives

stat, Readdir and Seek reached the filer on context.Background(), so a client
that walked away left the listing streaming and the lookups running. Seek also
missed the entries the listing had already fetched.

Write and cleanup paths keep their own context - a cancelled request must not
abandon a flush half done.
2026-07-30 11:58:14 -07:00
..
2026-02-20 18:42:00 -08:00
2026-04-10 17:31:14 -07:00