-
-
Notifications
You must be signed in to change notification settings - Fork 32k
Speed up posixpath.realpath()
#114847
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
Labels
Comments
barneygale
added a commit
to barneygale/cpython
that referenced
this issue
Feb 1, 2024
Apply the following optimizations to `posixpath.realpath()`: - Remove use of recursion - Directly construct child paths rather than using `join()` - Use `os.getcwd[b]()` rather than `abspath()` - Use `startswith(sep)` rather than `isabs()`
barneygale
added a commit
to barneygale/cpython
that referenced
this issue
Feb 1, 2024
Apply the following optimizations to `posixpath.realpath()`: - Remove use of recursion - Directly construct child paths rather than using `join()` - Use `os.getcwd[b]()` rather than `abspath()` - Use `startswith(sep)` rather than `isabs()`
barneygale
added a commit
to barneygale/cpython
that referenced
this issue
Mar 31, 2024
barneygale
added a commit
to barneygale/cpython
that referenced
this issue
Apr 1, 2024
barneygale
added a commit
to barneygale/cpython
that referenced
this issue
Apr 2, 2024
…achable)' On Linux >= 2.6.36 with glibc < 2.27, `getcwd()` can return a relative pathname starting with '(unreachable)'. We detect this and fail with ENOENT, matching new glibc behaviour.
barneygale
added a commit
to barneygale/cpython
that referenced
this issue
Apr 2, 2024
barneygale
added a commit
that referenced
this issue
Apr 3, 2024
…e)' (#117481) On Linux >= 2.6.36 with glibc < 2.27, `getcwd()` can return a relative pathname starting with '(unreachable)'. We detect this and fail with ENOENT, matching new glibc behaviour. Co-authored-by: Petr Viktorin <encukou@gmail.com>
barneygale
added a commit
to barneygale/cpython
that referenced
this issue
Apr 3, 2024
barneygale
added a commit
to barneygale/cpython
that referenced
this issue
Apr 4, 2024
This comment was marked as off-topic.
This comment was marked as off-topic.
barneygale
added a commit
to barneygale/cpython
that referenced
this issue
Apr 4, 2024
barneygale
added a commit
that referenced
this issue
Apr 5, 2024
Apply the following optimizations to `posixpath.realpath()`: - Remove use of recursion - Construct child paths directly rather than using `join()` - Use `os.getcwd[b]()` rather than `abspath()` - Use `startswith(sep)` rather than `isabs()` - Use slicing rather than `split()` Co-authored-by: Petr Viktorin <encukou@gmail.com>
Thank you! |
diegorusso
pushed a commit
to diegorusso/cpython
that referenced
this issue
Apr 17, 2024
…achable)' (python#117481) On Linux >= 2.6.36 with glibc < 2.27, `getcwd()` can return a relative pathname starting with '(unreachable)'. We detect this and fail with ENOENT, matching new glibc behaviour. Co-authored-by: Petr Viktorin <encukou@gmail.com>
diegorusso
pushed a commit
to diegorusso/cpython
that referenced
this issue
Apr 17, 2024
Apply the following optimizations to `posixpath.realpath()`: - Remove use of recursion - Construct child paths directly rather than using `join()` - Use `os.getcwd[b]()` rather than `abspath()` - Use `startswith(sep)` rather than `isabs()` - Use slicing rather than `split()` Co-authored-by: Petr Viktorin <encukou@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Uh oh!
There was an error while loading. Please reload this page.
Some optimizations to
posixpath.realpath()
are possible - see attached PR.Linked PRs
posixpath.realpath()
#114848The text was updated successfully, but these errors were encountered: