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.ls() with details=False slow #1788

Open
FrankEssenberger opened this issue Feb 10, 2025 · 1 comment
Open

LocalFileSystem.ls() with details=False slow #1788

FrankEssenberger opened this issue Feb 10, 2025 · 1 comment

Comments

@FrankEssenberger
Copy link

Hi fsspec developers,

I realized when using a later version of fsspec than the ones from 2023 that the .ls() was super slow. The reason came in in this issue PR: #1479 where always the info is taken for all files

Image

and then thrown away - for a large number of files this can become costly and the detail flag can not be used to reduce work. Before the mentioned PR the os.listdir was used which just list the number of files.

I just wanted to ask if I can open a PR in which thels used the os.listdir again for detail=False and if the path is a file it will just return the path to the file - no much use to call it for a file with not details but should of cours work. And if the details=True the code stays as is?

Let me know what you think.

Best
Frank

@martindurant
Copy link
Member

I would be happy to see such a PR.

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

No branches or pull requests

2 participants