-
Notifications
You must be signed in to change notification settings - Fork 74
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
scandir is slow when access stat #288
Comments
Instead of calling You can check the source code here smbprotocol/src/smbclient/_os.py Lines 526 to 568 in a951779
|
Thanks @adiroiban for sharing that info. The benefits of using |
My folder includes more than 6000 files, and need to list them order by last modified time.
I use the code
It costs about 60 seconds.
But if I remove the f
ile_info.stat().st_mtime
, it only takes 1 second.So it seems be caused by stat(). Anyway to accelerate the stat() or other way to list files order by last modified time
The text was updated successfully, but these errors were encountered: