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

LocalFileSystem::list_with_offset is very slow over network file system #7018

Open
corwinjoy opened this issue Jan 24, 2025 · 1 comment · May be fixed by #7019
Open

LocalFileSystem::list_with_offset is very slow over network file system #7018

corwinjoy opened this issue Jan 24, 2025 · 1 comment · May be fixed by #7019
Labels
enhancement Any new improvement worthy of a entry in the changelog

Comments

@corwinjoy
Copy link

corwinjoy commented Jan 24, 2025

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

We've encountered an issue when using arrow-rs via DeltaLake. Many times, delta files will hold dozens of parquet files in a log directory. To select recent files, the function LocalFileSystem::list_with_offset is called. This does not have an efficient implementation, instead, the entire directory is scanned in our example resulting in >100,000 statx system calls, several times for each file in the _delta_log subdirectory. This is terribly slow for our use case.

Describe the solution you'd like

Upgrade LocalFileSystem::list_with_offset to filter the files and cut the number of statx calls. We have a simple PR (to follow) which does this.
For our use case, it cuts the time to open the delta table from 35 seconds to 4 seconds.

Describe alternatives you've considered

There are likely fancier ways to filter these files and cut the number of statx calls, but a simple pre-filter like what we have done in the associated PR is quite effective. In general, it would be nice to have a more optimized LocalFileSystem implementation.

Additional context

@corwinjoy corwinjoy added the enhancement Any new improvement worthy of a entry in the changelog label Jan 24, 2025
@alamb
Copy link
Contributor

alamb commented Jan 25, 2025

👍 seems like a good idea to me -- thanks @corwinjoy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Any new improvement worthy of a entry in the changelog
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants