Title: Optimize pathlib path construction · Issue #101362 · python/cpython · GitHub
Open Graph Title: Optimize pathlib path construction · Issue #101362 · python/cpython
X Title: Optimize pathlib path construction · Issue #101362 · python/cpython
Description: Pathlib is slow. One of the most obvious symptoms is that pathlib.PurePath objects are slow to construct. We should be able to speed construction up without making other parts of pathlib slower. Two possible approaches: Optimize the exis...
Open Graph Description: Pathlib is slow. One of the most obvious symptoms is that pathlib.PurePath objects are slow to construct. We should be able to speed construction up without making other parts of pathlib slower. Tw...
X Description: Pathlib is slow. One of the most obvious symptoms is that pathlib.PurePath objects are slow to construct. We should be able to speed construction up without making other parts of pathlib slower. Tw...
Opengraph URL: https://github.com/python/cpython/issues/101362
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Optimize pathlib path construction","articleBody":"[Pathlib is slow](https://github.com/faster-cpython/ideas/discussions/194). One of the most obvious symptoms is that `pathlib.PurePath` objects are slow to construct. We should be able to speed construction up without making other parts of pathlib slower.\r\n\r\nTwo possible approaches:\r\n\r\n1. Optimize the existing machinary of path construction: `__new__()`, `_from_parts()`, `_parse_parts()`, `_parse_args()`.\r\n2. Perform less work in the constructor: defer parsing, joining and normalization until needed.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-101560\n* gh-101664\n* gh-101665\n* gh-101667\n* gh-102476\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/barneygale","@type":"Person","name":"barneygale"},"datePublished":"2023-01-27T02:24:40.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":10},"url":"https://github.com/101362/cpython/issues/101362"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:2dbb8fcb-d141-e313-0e20-145cfe3b95b5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9FF6:174FB1:5B0AD7:7C3592:696AACF9 |
| html-safe-nonce | aacfbb7e51c3c48b74f5a7da205bce770855d748995031f21ec711cb51ba73a7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RkY2OjE3NEZCMTo1QjBBRDc6N0MzNTkyOjY5NkFBQ0Y5IiwidmlzaXRvcl9pZCI6IjU5MTM4Njg3NzA4OTQwNjQ4OTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 02a8e7aac6d7c22e128e13dbc1a2fa0e317f6c42005a71923db33f62423dd34e |
| hovercard-subject-tag | issue:1559071717 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/101362/issue_layout |
| twitter:image | https://opengraph.githubassets.com/61f04fa9dea40456898b1b7f40c63786616c34ac916c558a1e2afbe16347bf89/python/cpython/issues/101362 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/61f04fa9dea40456898b1b7f40c63786616c34ac916c558a1e2afbe16347bf89/python/cpython/issues/101362 |
| og:image:alt | Pathlib is slow. One of the most obvious symptoms is that pathlib.PurePath objects are slow to construct. We should be able to speed construction up without making other parts of pathlib slower. Tw... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | barneygale |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3eaf9b8cf1badcd7041a8ad480b9d9b28bea0ef1cc821ca9ff20f2cc7f4fe4b9 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | dd9a979046e6382bd084e2bd873bf65f797125ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width