Title: Improve Windows performance of `pathlib.Path.is_file` and friends · Issue #101357 · python/cpython · GitHub
Open Graph Title: Improve Windows performance of `pathlib.Path.is_file` and friends · Issue #101357 · python/cpython
X Title: Improve Windows performance of `pathlib.Path.is_file` and friends · Issue #101357 · python/cpython
Description: Feature or enhancement We could implement / reuse the same fast paths that we did for os.path.* in #101324 for pathlib.Path.*. It will require a little more work, since the pathlib.Path API can return OSError under certain circumstances,...
Open Graph Description: Feature or enhancement We could implement / reuse the same fast paths that we did for os.path.* in #101324 for pathlib.Path.*. It will require a little more work, since the pathlib.Path API can ret...
X Description: Feature or enhancement We could implement / reuse the same fast paths that we did for os.path.* in #101324 for pathlib.Path.*. It will require a little more work, since the pathlib.Path API can ret...
Opengraph URL: https://github.com/python/cpython/issues/101357
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Improve Windows performance of `pathlib.Path.is_file` and friends","articleBody":"# Feature or enhancement\r\n\r\nWe could implement / reuse the same fast paths that we did for `os.path.*` in #101324 for `pathlib.Path.*`. It will require a little more work, since the `pathlib.Path` API can return `OSError` under certain circumstances, whereas `os.path` would return `False` in those cases.\r\n\r\n# Pitch\r\n\r\nWe saw a 12-25% speedup doing this for `os.path`. It would be unfortunate if people chose the lower-level API for performance reasons because `pathlib.Path` didn't match it in performance.\r\n\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-101361\n* gh-118243\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/mdboom","@type":"Person","name":"mdboom"},"datePublished":"2023-01-26T22:56:12.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":14},"url":"https://github.com/101357/cpython/issues/101357"}
| 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:9ccc3e86-b3f9-3995-6339-c8e74f4c6ef6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9F78:135F21:21A8CC0:2F02C53:69693A27 |
| html-safe-nonce | bd9f301ca4effef6c7b12f78a02cc519359633d94ce37c4e9ee0af4c0a24fd00 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Rjc4OjEzNUYyMToyMUE4Q0MwOjJGMDJDNTM6Njk2OTNBMjciLCJ2aXNpdG9yX2lkIjoiMzU5NDE1NjQ3NDc2Mjg2OTI4NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6873832a43fb8bf15d10e5c642fb15a3ff012ca6a69f60478b345e2c187f995d |
| hovercard-subject-tag | issue:1558898987 |
| 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/101357/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7252f07e0ccca3292726bf501b2ad0912248a2780e8d82b1330b6c8782bc64c1/python/cpython/issues/101357 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7252f07e0ccca3292726bf501b2ad0912248a2780e8d82b1330b6c8782bc64c1/python/cpython/issues/101357 |
| og:image:alt | Feature or enhancement We could implement / reuse the same fast paths that we did for os.path.* in #101324 for pathlib.Path.*. It will require a little more work, since the pathlib.Path API can ret... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mdboom |
| hostname | github.com |
| expected-hostname | github.com |
| None | 54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d |
| 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 | d69ac0477df0f87da03b8b06cebd187012d7a930 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width