Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-117394: Speed up os.path.ismount() on Posix#117447
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
gh-117394: Speed up os.path.ismount() on Posix#117447
Uh oh!
There was an error while loading.Please reload this page.
Conversation
It is now 2-3 times faster if the user has permissions.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
nineteendo commentedApr 3, 2024 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Benchmark: # test.shecho"relative"&& python -m timeit -s"import before.posixpath""before.posixpath.ismount('.')"&& python -m timeit -s"import after.posixpath""after.posixpath.ismount('.')"echo"absolute"&& python -m timeit -s"import before.posixpath""before.posixpath.ismount('/Volumes/2GB_001')"&& python -m timeit -s"import after.posixpath""after.posixpath.ismount('/Volumes/2GB_001')"echo"no permission"&& python -m timeit -s"import before.posixpath""before.posixpath.ismount('/Users/wannes/path-picker/permission-test/dirs/666')"&& python -m timeit -s"import after.posixpath""after.posixpath.ismount('/Users/wannes/path-picker/permission-test/dirs/666')" |
Uh oh!
There was an error while loading.Please reload this page.
nineteendo commentedApr 10, 2024
@erlend-aasland, could you review this? |
erlend-aasland commentedApr 11, 2024
Looks good to me, but I'm not sure if it worth the added maintenance cost to optimise this. I mean, how often is the |
It is now 2-3 times faster if the user has permissions.
Uh oh!
There was an error while loading.Please reload this page.
It is now 2-3 times faster if the user has permissions.
posixpath.ismount#117394