You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The directory traversal performs a .metadata() on each entry to check whether it is a directory, which results in a syscall. This is extremely wasteful since DirEntry::file_type can grab the file type directly from the readdir results which are obtained in batches via getdents syscall, i.e. only 1 syscall every N directory entries.
An additional problem is that there are multiple metadata() calls. They are not cached on the file descriptor, so each call results in an additional syscall.
The text was updated successfully, but these errors were encountered:
Maybe this could also be fixed by improving the standard library? As it stands, I don't think there's anyway to access the results of readdir in rust (using the standard library). So I think this is more of a problem to do with the standard library.
The directory traversal performs a
.metadata()
on each entry to check whether it is a directory, which results in a syscall. This is extremely wasteful sinceDirEntry::file_type
can grab the file type directly from the readdir results which are obtained in batches viagetdents
syscall, i.e. only 1 syscall every N directory entries.An additional problem is that there are multiple
metadata()
calls. They are not cached on the file descriptor, so each call results in an additional syscall.The text was updated successfully, but these errors were encountered: