anjakefala opened a new pull request, #34170:
URL: https://github.com/apache/arrow/pull/34170

   ### Rationale for this change
   
   When set to false on localFS, use std::filesystem to set FileType instead of 
stat(). Does nothing for the other filesystems.
   
   Improves performance 10x on checks whether entities are directories or files 
on localFS. file size and mtime are not set.
   
   
   ### What changes are included in this PR?
   
   Added variable `needs_extended_file_info` (default `true`) to struct 
`FileSelector`.
   
   When `false`, `StatSelector` (called by `GetFileInfo (FileSelector)`) will 
call `IdentifyFile` instead of `StatFile`. `IdentifyFile` will then use 
`std::filesystem` to set the `.type`, instead of using `stat()`.
   
   ### Are these changes tested?
   
   A basic test was added.
   
   ### Are there any user-facing changes?
   
   Yes, an optional variable was added to the `FileSelector` struct. Would a 
cookbook example or docstring update be appropriate?


-- 
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