Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

object/file: use Readdir to lookup FileInfo faster #4006

Merged
merged 2 commits into from
Aug 18, 2023
Merged

Conversation

davies
Copy link
Contributor

@davies davies commented Aug 18, 2023

Change back to use Readdir() instead of ReadDir(), because List() needs FileInfo, Readdir() issue lstat() during the loop (cache hit), but ReadDir() will not, so we will issue lstat() after that, (cache miss). When list a huge directory, Readdir() can be much faster than ReadDir() + many lstats().

@davies davies merged commit e4e61c2 into main Aug 18, 2023
@davies davies deleted the rollback_readdir branch August 18, 2023 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant