René's URL Explorer Experiment


Title: UNSAFE Temporary workaround for LFS checkout performance regression by AlexaXs · Pull Request #1883 · nodegit/nodegit · GitHub

Open Graph Title: UNSAFE Temporary workaround for LFS checkout performance regression by AlexaXs · Pull Request #1883 · nodegit/nodegit

X Title: UNSAFE Temporary workaround for LFS checkout performance regression by AlexaXs · Pull Request #1883 · nodegit/nodegit

Description: After a Threadpool rewrite for context-awareness, LFS checkouts started suffering long delays. We found the reason is that libgit2 callbacks that were being run in parallel started being run in sequence. But this is actually the safest way to deal with the callbacks, preventing deadlocks while being executed, and keeping the non-callback work thread-safe. The changes here will just be an UNSAFE temporary workaround until LFS is properly integrated into NodeGit. The changes will be limited to the processing of callbacks from Workers that leverage threaded libgit2 functions (at the moment, only checkout functionality), and they basically allow the callbacks from the current Worker to be queued to the main JS thread without waiting for the current callback to end. It is UNSAFE because with threaded libgit2 functions there will be a potential risk of deadlock if the callbacks need to lock an object that is already locked by the current Worker. The Unsafe commit in this PR will be reverted once LFS is integrated into nodegit.

Open Graph Description: After a Threadpool rewrite for context-awareness, LFS checkouts started suffering long delays. We found the reason is that libgit2 callbacks that were being run in parallel started being run in seq...

X Description: After a Threadpool rewrite for context-awareness, LFS checkouts started suffering long delays. We found the reason is that libgit2 callbacks that were being run in parallel started being run in seq...

Opengraph URL: https://github.com/nodegit/nodegit/pull/1883

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:2d36d861-044f-8513-2493-0b08bd728b3f
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA844:300F93:8974F6D:BB000E3:6A5E9BC1
html-safe-nonceea038d85fa7552209e77389cf250620b774828ce93325691ee695f0e58f85aa3
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODQ0OjMwMEY5Mzo4OTc0RjZEOkJCMDAwRTM6NkE1RTlCQzEiLCJ2aXNpdG9yX2lkIjoiMTU5NDkxNDk5NzM4OTkyNTMxMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac4877a7c6ae8a5c88ed5d65ca3ad6755cdf2604243843b605be9f7bfa15f73f84
hovercard-subject-tagpull_request:802368124
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/nodegit/nodegit/pull/1883/files
twitter:imagehttps://avatars.githubusercontent.com/u/80953497?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/80953497?s=400&v=4
og:image:altAfter a Threadpool rewrite for context-awareness, LFS checkouts started suffering long delays. We found the reason is that libgit2 callbacks that were being run in parallel started being run in seq...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7c7e31acb6a895494e518b880f5ccf39604f7fa9a8f2f3c64145efc3b776256d
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/nodegit/nodegit git https://github.com/nodegit/nodegit.git
octolytics-dimension-user_id657068
octolytics-dimension-user_loginnodegit
octolytics-dimension-repository_id1383170
octolytics-dimension-repository_nwonodegit/nodegit
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1383170
octolytics-dimension-repository_network_root_nwonodegit/nodegit
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2d2ac9bdd71d5f53f2b731c9330677e38624e301
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/nodegit/nodegit/pull/1883/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodegit%2Fnodegit%2Fpull%2F1883%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodegit%2Fnodegit%2Fpull%2F1883%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=nodegit%2Fnodegit
Reloadhttps://github.com/nodegit/nodegit/pull/1883/files
Reloadhttps://github.com/nodegit/nodegit/pull/1883/files
Reloadhttps://github.com/nodegit/nodegit/pull/1883/files
Please reload this pagehttps://github.com/nodegit/nodegit/pull/1883/files
nodegit https://github.com/nodegit
nodegithttps://github.com/nodegit/nodegit
Notifications https://github.com/login?return_to=%2Fnodegit%2Fnodegit
Fork 698 https://github.com/login?return_to=%2Fnodegit%2Fnodegit
Star 5.8k https://github.com/login?return_to=%2Fnodegit%2Fnodegit
Code https://github.com/nodegit/nodegit
Issues 343 https://github.com/nodegit/nodegit/issues
Pull requests 20 https://github.com/nodegit/nodegit/pulls
Actions https://github.com/nodegit/nodegit/actions
Projects https://github.com/nodegit/nodegit/projects
Security and quality 0 https://github.com/nodegit/nodegit/security
Insights https://github.com/nodegit/nodegit/pulse
Code https://github.com/nodegit/nodegit
Issues https://github.com/nodegit/nodegit/issues
Pull requests https://github.com/nodegit/nodegit/pulls
Actions https://github.com/nodegit/nodegit/actions
Projects https://github.com/nodegit/nodegit/projects
Security and quality https://github.com/nodegit/nodegit/security
Insights https://github.com/nodegit/nodegit/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fnodegit%2Fnodegit%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fnodegit%2Fnodegit%2Fissues%2Fnew%2Fchoose
ianhattendorfhttps://github.com/ianhattendorf
nodegit:masterhttps://github.com/nodegit/nodegit/tree/master
AlexaXs:fix/LFS-checkout-performance-regressionhttps://github.com/AlexaXs/nodegit/tree/fix/LFS-checkout-performance-regression
Conversation 6 https://github.com/nodegit/nodegit/pull/1883
Commits 4 https://github.com/nodegit/nodegit/pull/1883/commits
Checks 0 https://github.com/nodegit/nodegit/pull/1883/checks
Files changed https://github.com/nodegit/nodegit/pull/1883/files
Please reload this pagehttps://github.com/nodegit/nodegit/pull/1883/files
UNSAFE Temporary workaround for LFS checkout performance regression https://github.com/nodegit/nodegit/pull/1883/files#top
Show all changes 4 commits https://github.com/nodegit/nodegit/pull/1883/files
01fceca Remove unused code AlexaXs Dec 14, 2021 https://github.com/nodegit/nodegit/pull/1883/commits/01fcecab12a8298aa373266a2a9a17986fec8bc5
1aaf2ee Test deadlock in callbacks AlexaXs Jan 23, 2022 https://github.com/nodegit/nodegit/pull/1883/commits/1aaf2ee148664854f49b623dc7dadad7192f1952
7b248d9 Unsafe temporary workaround for LFS checkout lost performance AlexaXs Jan 23, 2022 https://github.com/nodegit/nodegit/pull/1883/commits/7b248d9b7900796a79e58da85980c023def873d7
caec819 Tests on worker thread terminate while doing a checkout AlexaXs Feb 17, 2022 https://github.com/nodegit/nodegit/pull/1883/commits/caec8195155d169495b53cf16238c01c9597f114
Clear filters https://github.com/nodegit/nodegit/pull/1883/files
Please reload this pagehttps://github.com/nodegit/nodegit/pull/1883/files
Please reload this pagehttps://github.com/nodegit/nodegit/pull/1883/files
thread_pool.h https://github.com/nodegit/nodegit/pull/1883/files#diff-a4a6f776389c716096e228f798faa00dccca53782c0ca39a42ce03fbca0b1c0b
async_baton.cc https://github.com/nodegit/nodegit/pull/1883/files#diff-4270fecc8786f6e5e946020ad8fd705df9f4785e0cf55a1441f2cb9f41906b41
thread_pool.cc https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
filter.js https://github.com/nodegit/nodegit/pull/1883/files#diff-507c9f40a0ab60c73be97ab4793a9f5c4a44895cd6303785045381b90790f9eb
submodule.js https://github.com/nodegit/nodegit/pull/1883/files#diff-1e09b469a05f822617e288bc8328b0a45489f344fbb76b760f73a0a5e80e0e5f
worker.js https://github.com/nodegit/nodegit/pull/1883/files#diff-71ac32e7ff08e2dc668059e108681d47f1f2237e67e7d59573a4473da47e1442
loop_checkout.js https://github.com/nodegit/nodegit/pull/1883/files#diff-d4ef23b1c64f2a18f912998a60030e596424de981efe44a7b79901b4fe66d932
worker_checkout.js https://github.com/nodegit/nodegit/pull/1883/files#diff-0de55c2cfc3dd90426add40693fa2d5f905697171c8e0a7a9ad18ed6adc5377f
worker_context_aware.js https://github.com/nodegit/nodegit/pull/1883/files#diff-748057b97d6b106dfd7334655b2663b337559aec100ce61964054b43a64d9617
worker_context_aware_checkout.js https://github.com/nodegit/nodegit/pull/1883/files#diff-4877bee6689071e3598901e1f43dadb3a28d39bd26842d5750041e5aa70ec5bb
generate/templates/manual/include/thread_pool.hhttps://github.com/nodegit/nodegit/pull/1883/files#diff-a4a6f776389c716096e228f798faa00dccca53782c0ca39a42ce03fbca0b1c0b
View file https://github.com/AlexaXs/nodegit/blob/caec8195155d169495b53cf16238c01c9597f114/generate/templates/manual/include/thread_pool.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodegit/nodegit/pull/1883/{{ revealButtonHref }}
https://github.com/nodegit/nodegit/pull/1883/files#diff-a4a6f776389c716096e228f798faa00dccca53782c0ca39a42ce03fbca0b1c0b
https://github.com/nodegit/nodegit/pull/1883/files#diff-a4a6f776389c716096e228f798faa00dccca53782c0ca39a42ce03fbca0b1c0b
https://github.com/nodegit/nodegit/pull/1883/files#diff-a4a6f776389c716096e228f798faa00dccca53782c0ca39a42ce03fbca0b1c0b
generate/templates/manual/src/async_baton.cchttps://github.com/nodegit/nodegit/pull/1883/files#diff-4270fecc8786f6e5e946020ad8fd705df9f4785e0cf55a1441f2cb9f41906b41
View file https://github.com/AlexaXs/nodegit/blob/caec8195155d169495b53cf16238c01c9597f114/generate/templates/manual/src/async_baton.cc
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodegit/nodegit/pull/1883/{{ revealButtonHref }}
https://github.com/nodegit/nodegit/pull/1883/files#diff-4270fecc8786f6e5e946020ad8fd705df9f4785e0cf55a1441f2cb9f41906b41
https://github.com/nodegit/nodegit/pull/1883/files#diff-4270fecc8786f6e5e946020ad8fd705df9f4785e0cf55a1441f2cb9f41906b41
https://github.com/nodegit/nodegit/pull/1883/files#diff-4270fecc8786f6e5e946020ad8fd705df9f4785e0cf55a1441f2cb9f41906b41
generate/templates/manual/src/thread_pool.cchttps://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
View file https://github.com/AlexaXs/nodegit/blob/caec8195155d169495b53cf16238c01c9597f114/generate/templates/manual/src/thread_pool.cc
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodegit/nodegit/pull/1883/{{ revealButtonHref }}
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
https://github.com/nodegit/nodegit/pull/1883/files#diff-925de64dd64c4ad4d4bca7bd73cd9f8af9f55a25d1d8b059f7e68b1922c6b4f7
test/tests/filter.jshttps://github.com/nodegit/nodegit/pull/1883/files#diff-507c9f40a0ab60c73be97ab4793a9f5c4a44895cd6303785045381b90790f9eb
View file https://github.com/AlexaXs/nodegit/blob/caec8195155d169495b53cf16238c01c9597f114/test/tests/filter.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodegit/nodegit/pull/1883/{{ revealButtonHref }}
https://github.com/nodegit/nodegit/pull/1883/files#diff-507c9f40a0ab60c73be97ab4793a9f5c4a44895cd6303785045381b90790f9eb
https://github.com/nodegit/nodegit/pull/1883/files#diff-507c9f40a0ab60c73be97ab4793a9f5c4a44895cd6303785045381b90790f9eb
test/tests/submodule.jshttps://github.com/nodegit/nodegit/pull/1883/files#diff-1e09b469a05f822617e288bc8328b0a45489f344fbb76b760f73a0a5e80e0e5f
View file https://github.com/AlexaXs/nodegit/blob/caec8195155d169495b53cf16238c01c9597f114/test/tests/submodule.js
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/nodegit/nodegit/pull/1883/{{ revealButtonHref }}
https://github.com/nodegit/nodegit/pull/1883/files#diff-1e09b469a05f822617e288bc8328b0a45489f344fbb76b760f73a0a5e80e0e5f
Please reload this pagehttps://github.com/nodegit/nodegit/pull/1883/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.