granian
granian copied to clipboard
Investigate if `Path::canonicalize` should be asyncified
Following discussion in #577, the static file server calls Path::canonicalize in the worker thread. It's not clear if this risks blocking the worker thread enough to matter. There's a tokio::fs::canonicalize which could replace it if it needs to get moved to the I/O worker pool.
The risk is near-zero on local FS, maybe only under extreme I/O or memory pressure; however, in such cases, it would be the least of all worries.
With remote FS (NFS in particular), this could indeed cause noticeable blocking, especially if the remote side is unavailable for a while.