Closed
Description
ChunkWriterThread::run
currently calls create_dir_all()
twice, which is useless at best but causes quite a lot of IO.
We can reduce IO further by asking for forgivness instead of permission and moving the create_dir_all()
-call into a new error-path for fs::File::create(&tmp_path).unwrap();
. As the path will exist for almost all but one calls to fs::File::create()
per path
, we should just try to create the file directly and only create the path structure in case we fail. This saves us from a lot of stat64-calls.
Metadata
Metadata
Assignees
Labels
No labels