FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-110109: Speed up `pathlib._PathBase.resolve()` by barneygale · Pull Request #110412 · python/cpython · GitHub

/ cpython Public

GH-110109: Speed up pathlib._PathBase.resolve() - #110412

Merged
barneygale merged 3 commits into
python:mainfrom
barneygale:gh-110109-pathbase-resolve-speedups
Nov 17, 2023
Merged

GH-110109: Speed up pathlib._PathBase.resolve()#110412
barneygale merged 3 commits into
python:mainfrom
barneygale:gh-110109-pathbase-resolve-speedups

Conversation

barneygale commented Oct 5, 2023
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor
  • Add fast path to _split_stack()
  • Skip unnecessarily resolution of the current directory when a relative path is given to resolve()
  • Remove stat and target caches, which slow down most resolve() calls in practice.
  • Slightly refactor code for clarity.

- Add fast path to `_split_stack()`
- Skip unnecessarily resolution of the current directory when a relative
  path is given to `resolve()`
- Remove stat and target caches, which slow down most `resolve()` calls in
  practice.
- Slightly refactor code for clarity.
barneygale added performance Performance or resource usage topic-pathlib labels Oct 5, 2023
bedevere-app Bot mentioned this pull request Oct 5, 2023
8 tasks
barneygale marked this pull request as ready for review October 5, 2023 19:45

Copy link
Copy Markdown
Contributor Author

This method can't yet be invoked using public APIs, so there's little risk here. Merging!

barneygale merged commit 9fb0f2d into python:main Nov 17, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
- Add fast path to `_split_stack()`
- Skip unnecessarily resolution of the current directory when a relative
  path is given to `resolve()`
- Remove stat and target caches, which slow down most `resolve()` calls in
  practice.
- Slightly refactor code for clarity.
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
- Add fast path to `_split_stack()`
- Skip unnecessarily resolution of the current directory when a relative
  path is given to `resolve()`
- Remove stat and target caches, which slow down most `resolve()` calls in
  practice.
- Slightly refactor code for clarity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Performance or resource usage skip news topic-pathlib

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL