René's URL Explorer Experiment


Title: git_status_list is slower than `git status` · Issue #4230 · libgit2/libgit2 · GitHub

Open Graph Title: git_status_list is slower than `git status` · Issue #4230 · libgit2/libgit2

X Title: git_status_list is slower than `git status` · Issue #4230 · libgit2/libgit2

Description: Reproduction steps Build provided libgit2status tool (I'll post it source in the next comment to keep initial report easier to read) and run it in the root of large enough repo. Compare it speed with git status. % go version go version g...

Open Graph Description: Reproduction steps Build provided libgit2status tool (I'll post it source in the next comment to keep initial report easier to read) and run it in the root of large enough repo. Compare it speed wi...

X Description: Reproduction steps Build provided libgit2status tool (I'll post it source in the next comment to keep initial report easier to read) and run it in the root of large enough repo. Compare it spee...

Opengraph URL: https://github.com/libgit2/libgit2/issues/4230

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"git_status_list is slower than `git status`","articleBody":"### Reproduction steps\r\n\r\nBuild provided `libgit2status` tool (I'll post it source in the next comment to keep initial report easier to read) and run it in the root of large enough repo. Compare it speed with `git status`.\r\n\r\n```\r\n% go version\r\ngo version go1.8.1 linux/amd64\r\n% git --version\r\ngit version 2.10.2\r\n% git clone https://github.com/gentoo/gentoo.git\r\n% cd gentoo\r\n% find -type f | wc -l\r\n99540\r\n% find -type d | wc -l\r\n27306\r\n% git config core.untrackedCache false\r\n% time git status --short\r\n\r\n0.257 real  0.128 user  0.206 sys  32MB RAM\r\n% git config core.untrackedCache true\r\n% time git status --short\r\n\r\n0.097 real  0.067 user  0.110 sys  38MB RAM\r\n% time libgit2status\r\n{AddedFiles:0 ModifiedFiles:0 DeletedFiles:0 RenamedFiles:0 UnmergedFiles:0 HasUntrackedFiles:false}\r\n\r\n0.626 real  0.340 user  0.282 sys  154MB RAM\r\n% touch profiles/base/testfile.added\r\n% touch profiles/base/testfile.new\r\n% git add profiles/base/testfile.added\r\n% time git status --short\r\nA  profiles/base/testfile.added\r\n?? profiles/base/testfile.new\r\n\r\n0.115 real  0.082 user  0.108 sys  38MB RAM\r\n% git config core.untrackedCache false\r\n% time git status --short\r\nA  profiles/base/testfile.added\r\n?? profiles/base/testfile.new\r\n\r\n0.255 real  0.134 user  0.193 sys  32MB RAM\r\n% time libgit2status\r\n{AddedFiles:1 ModifiedFiles:0 DeletedFiles:0 RenamedFiles:0 UnmergedFiles:0 HasUntrackedFiles:true}\r\n\r\n0.611 real  0.358 user  0.250 sys  154MB RAM\r\n```\r\n\r\n### Expected behavior\r\n\r\nWell… in my dream git2go should works at least as fast as `git status`… actually faster if we just needs to know is workdir is dirty or is it has any untracked files - without needs to know full list of all added/modified/untracked/etc. files output by `git status`.\r\n\r\n### Actual behavior\r\n\r\nIt's nearly 2.5 times slower than `git status` on my system (HDD, i7-2600K overcloked @ 4.5GHz) without untrackedCache and 5-6 times slower with untrackedCache.\r\n\r\nWhile strace-ing `git status` I've noticed it calls `lstat` from 2 or 3 threads - can this be the reason?\r\n\r\nFor all `time`d runs above I take average result from several runs and my system has enough RAM to keep dircache for the full repo, so there was no (noticeable, at least) disk accesses, and thus HDD/SSD shouldn't make any difference.\r\n\r\n### Version of libgit2 (release number or SHA1)\r\n\r\ndf4dfaa\r\n\r\nThis version is vendored by git2go. I've tried to update to current master but get this error:\r\n```\r\n./submodule.go:339: ptr.clone_checkout_strategy undefined (type *C.struct_git_submodule_update_options has no field or method clone_checkout_strategy)\r\n```\r\nIf something was just renamed then it probably can be easily fixed to allow testing with latest master.\r\n\r\n### Operating system(s) tested\r\n\r\nHardened Gentoo Linux, amd64.","author":{"url":"https://github.com/powerman","@type":"Person","name":"powerman"},"datePublished":"2017-05-02T13:02:47.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":32},"url":"https://github.com/4230/libgit2/issues/4230"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:54123ef0-848c-8f8d-1c55-e5f65947c800
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id93DC:B1D4C:61DE411:80387CD:6A5DBB6B
html-safe-nonceecf4eaab7f0a7a1416dfc8972fe05bc640c133102172a3531473919a1840bf0a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5M0RDOkIxRDRDOjYxREU0MTE6ODAzODdDRDo2QTVEQkI2QiIsInZpc2l0b3JfaWQiOiI0OTI5NzQ2OTU0Mjc5MDQxODk5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac95cd10969d18d82d0bb8a48ea730f091879877d923dc9d3428b26259f5253b46
hovercard-subject-tagissue:225688146
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/libgit2/libgit2/4230/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5d918de24c54ada6a04c0d37001bc862e9b542bb61a71ca84d4e298ec1fce25d/libgit2/libgit2/issues/4230
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5d918de24c54ada6a04c0d37001bc862e9b542bb61a71ca84d4e298ec1fce25d/libgit2/libgit2/issues/4230
og:image:altReproduction steps Build provided libgit2status tool (I'll post it source in the next comment to keep initial report easier to read) and run it in the root of large enough repo. Compare it speed wi...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepowerman
hostnamegithub.com
expected-hostnamegithub.com
None5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b
turbo-cache-controlno-preview
go-importgithub.com/libgit2/libgit2 git https://github.com/libgit2/libgit2.git
octolytics-dimension-user_id394745
octolytics-dimension-user_loginlibgit2
octolytics-dimension-repository_id901662
octolytics-dimension-repository_nwolibgit2/libgit2
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id901662
octolytics-dimension-repository_network_root_nwolibgit2/libgit2
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9c975978430e9ad293956f2bbdaf153b1bd84a99
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/libgit2/libgit2/issues/4230#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Flibgit2%2Flibgit2%2Fissues%2F4230
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
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%2Flibgit2%2Flibgit2%2Fissues%2F4230
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%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=libgit2%2Flibgit2
Reloadhttps://github.com/libgit2/libgit2/issues/4230
Reloadhttps://github.com/libgit2/libgit2/issues/4230
Reloadhttps://github.com/libgit2/libgit2/issues/4230
Please reload this pagehttps://github.com/libgit2/libgit2/issues/4230
libgit2 https://github.com/libgit2
libgit2https://github.com/libgit2/libgit2
Notifications https://github.com/login?return_to=%2Flibgit2%2Flibgit2
Fork 2.6k https://github.com/login?return_to=%2Flibgit2%2Flibgit2
Star 10.5k https://github.com/login?return_to=%2Flibgit2%2Flibgit2
Code https://github.com/libgit2/libgit2
Issues 423 https://github.com/libgit2/libgit2/issues
Pull requests 108 https://github.com/libgit2/libgit2/pulls
Discussions https://github.com/libgit2/libgit2/discussions
Actions https://github.com/libgit2/libgit2/actions
Projects https://github.com/libgit2/libgit2/projects
Security and quality 9 https://github.com/libgit2/libgit2/security
Insights https://github.com/libgit2/libgit2/pulse
Code https://github.com/libgit2/libgit2
Issues https://github.com/libgit2/libgit2/issues
Pull requests https://github.com/libgit2/libgit2/pulls
Discussions https://github.com/libgit2/libgit2/discussions
Actions https://github.com/libgit2/libgit2/actions
Projects https://github.com/libgit2/libgit2/projects
Security and quality https://github.com/libgit2/libgit2/security
Insights https://github.com/libgit2/libgit2/pulse
git_status_list is slower than git statushttps://github.com/libgit2/libgit2/issues/4230#top
https://github.com/powerman
powermanhttps://github.com/powerman
on May 2, 2017https://github.com/libgit2/libgit2/issues/4230#issue-225688146
df4dfaahttps://github.com/libgit2/libgit2/commit/df4dfaadcf709646ebab2e57e3589952cf1ac809
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.