Xuanwo commented on code in PR #5005:
URL: https://github.com/apache/opendal/pull/5005#discussion_r1715560048


##########
core/src/services/fs/lister.rs:
##########
@@ -69,7 +72,8 @@ impl oio::List for FsLister<tokio::fs::ReadDir> {
             oio::Entry::new(&rel_path, Metadata::new(EntryMode::Unknown))
         };
 
-        Ok(Some(d))

Review Comment:
   Hi, how about using `metakey` to determine whether to call `de.metadata()`, 
which involves a syscall, instead of just deciding whether to fill in 
`Metadata`.
   
   If `metakey` is not `default()`, we can call `de.metadata()` to populate the 
metadata in the entry. We can do this early, before building the `Entry`.
   
   ---
   
   Maybe we can even save a `de.file_type()` call.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to