Title: GH-124567: Reduce overhead of cycle GC. by markshannon · Pull Request #124717 · python/cpython · GitHub
Open Graph Title: GH-124567: Reduce overhead of cycle GC. by markshannon · Pull Request #124717 · python/cpython
X Title: GH-124567: Reduce overhead of cycle GC. by markshannon · Pull Request #124717 · python/cpython
Description: This PR makes the following changes to cycle GC, to reduce the overhead observed in #124567: Does not form the transitive closure of the young generation before collecting it. Avoids scanning too much of the heap that is likely reachable. Performs an amount of work proportional to the young collection in the incremental collection, avoiding n**2 performance on large heaps (this was a regression w.r.t. 3.12) At the start of each full scan, mark all objects reachable from sys.modules, so they are not scanned this scan. Computes the delta in heap size during incremental collection, and accelerates incremental collection if the heap is growing Adds a _testinternalcapi.get_heap_size() function for more precise testing of the GC Before merging, I need to: Get performance numbers and stats for this version Likewise for an alternative version that does form the transitive closure of the young generation, but only does so after marking reachable objects. I still need benchmarks and stats for this before merging. Issue: gh-124567
Open Graph Description: This PR makes the following changes to cycle GC, to reduce the overhead observed in #124567: Does not form the transitive closure of the young generation before collecting it. Avoids scanning too ...
X Description: This PR makes the following changes to cycle GC, to reduce the overhead observed in #124567: Does not form the transitive closure of the young generation before collecting it. Avoids scanning too ...
Opengraph URL: https://github.com/python/cpython/pull/124717
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:72809c2b-704d-ed12-05cc-3fca43264a7f |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 91C0:90430:4399E54:591F787:6992F38A |
| html-safe-nonce | a6f00e161b24081202952f20a61d3376c2e9a5e3ed982f4eb73c43f014558bda |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MUMwOjkwNDMwOjQzOTlFNTQ6NTkxRjc4Nzo2OTkyRjM4QSIsInZpc2l0b3JfaWQiOiI4OTA4NzgzNjU0MzM3MTgwNTU0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 646e90d0aa5c61bfa9377dd366ff17ac5c5ee486eeaff2e65531064c589dd8b2 |
| hovercard-subject-tag | pull_request:2096666539 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/python/cpython/pull/124717/checks |
| twitter:image | https://avatars.githubusercontent.com/u/9448417?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/9448417?s=400&v=4 |
| og:image:alt | This PR makes the following changes to cycle GC, to reduce the overhead observed in #124567: Does not form the transitive closure of the young generation before collecting it. Avoids scanning too ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 348cc0594c4976eb4050dc9547ecf65057ee89a2b7ed0652b983b9b539f57145 |
| 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 full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ce72317238c729e85014e1d867fd30d09b7f94ba |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width