Title: [WIP] Cache repository / owner values in persistent handle by srajko · Pull Request #962 · nodegit/nodegit · GitHub
Open Graph Title: [WIP] Cache repository / owner values in persistent handle by srajko · Pull Request #962 · nodegit/nodegit
X Title: [WIP] Cache repository / owner values in persistent handle by srajko · Pull Request #962 · nodegit/nodegit
Description: This works towards #955. Once we free repositories on wrapper GC, any object that can return a repository (for example, a GitCommit) can potentially return a freed repository. This PR adds persistent handles to any object that returns a repository. Once we enforce a 1-1 relationship between git_repository objects and GitRepository wrappers, this will ensure that the wrapper does not get GCd until all objects that can return the repository can get GCed as well. The stand-alone benefit of this PR is just that we don't create a new wrapper each time we return a repository from an object. Also, the caching mechanism might be helpful beyond holding a handle - we can extend it to cache any similar value and avoid calling into the libgit2 layer for sync functions (this can help with thread safety without requiring locking).
Open Graph Description: This works towards #955. Once we free repositories on wrapper GC, any object that can return a repository (for example, a GitCommit) can potentially return a freed repository. This PR adds persis...
X Description: This works towards #955. Once we free repositories on wrapper GC, any object that can return a repository (for example, a GitCommit) can potentially return a freed repository. This PR adds persis...
Opengraph URL: https://github.com/nodegit/nodegit/pull/962
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:6cdb0cff-98eb-513a-26d9-f3aa572206ca |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | E192:9A204:30DD05A:3F21994:6974E5DA |
| html-safe-nonce | e76e37de4a680517640c1b0863663f100334e0962f7d3434387f5519704387a5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMTkyOjlBMjA0OjMwREQwNUE6M0YyMTk5NDo2OTc0RTVEQSIsInZpc2l0b3JfaWQiOiI3MTQxMjk3MjIwNjY4OTQxNzg3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d5292c17ee1d13ce9e282a08f4d2734a037b7bdc3272c05a41a902784a7ac600 |
| hovercard-subject-tag | pull_request:63814835 |
| 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/nodegit/nodegit/pull/962/checks |
| twitter:image | https://avatars.githubusercontent.com/u/291007?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/291007?s=400&v=4 |
| og:image:alt | This works towards #955. Once we free repositories on wrapper GC, any object that can return a repository (for example, a GitCommit) can potentially return a freed repository. This PR adds persis... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 4a4bf5f4e28041a9d2e5c107d7d20b78b4294ba261cab243b28167c16a623a1f |
| turbo-cache-control | no-preview |
| go-import | github.com/nodegit/nodegit git https://github.com/nodegit/nodegit.git |
| octolytics-dimension-user_id | 657068 |
| octolytics-dimension-user_login | nodegit |
| octolytics-dimension-repository_id | 1383170 |
| octolytics-dimension-repository_nwo | nodegit/nodegit |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1383170 |
| octolytics-dimension-repository_network_root_nwo | nodegit/nodegit |
| 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 | 488b30e96dfd057fbbe44c6665ccbc030b729dde |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width