René's URL Explorer Experiment


Title: Parallel execution of individual hooks? · Issue #510 · pre-commit/pre-commit · GitHub

Open Graph Title: Parallel execution of individual hooks? · Issue #510 · pre-commit/pre-commit

X Title: Parallel execution of individual hooks? · Issue #510 · pre-commit/pre-commit

Description: I have this one hook that runs puppet parser validate which is extremely slow. Running it on just 185 files takes 105 seconds which makes my tests (which call pre-commit run --all-files, among other things) annoying enough to run that mo...

Open Graph Description: I have this one hook that runs puppet parser validate which is extremely slow. Running it on just 185 files takes 105 seconds which makes my tests (which call pre-commit run --all-files, among othe...

X Description: I have this one hook that runs puppet parser validate which is extremely slow. Running it on just 185 files takes 105 seconds which makes my tests (which call pre-commit run --all-files, among othe...

Opengraph URL: https://github.com/pre-commit/pre-commit/issues/510

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Parallel execution of individual hooks?","articleBody":"I have this one hook that runs `puppet parser validate` which is extremely slow. Running it on just 185 files takes 105 seconds which makes my tests (which call `pre-commit run --all-files`, among other things) annoying enough to run that most people don't run them locally.\r\n\r\nWhat if pre-commit's xargs implementation could do things in parallel? Here's a sketch of a patch that does that (only works on Python 3): https://i.fluffy.cc/t43V5vqd3VH9lTQfl8djnfZWBV2zDDTZ.html\r\n\r\nThis takes my test time from 105 seconds to 15 seconds.\r\n\r\nSome thoughts:\r\n\r\n* If any hooks write to files besides the ones they are linting, this could break. This is a problem, though pre-commit is heavily designed around operations on individual files, so the vast majority of hooks should be okay. We could offer an opt-in or opt-out at the individual hook level?\r\n* Parallelizing different hooks (running puppet-lint at the same time as puppet-validate) would be neat but I think is way more problematic (and introduces crazy locking problems since you can't have two hooks running on the same file at once).\r\n* Because pre-commit captures output and displays it at the end, I don't think we have any of the usual problems of interleaved/confusing output. The printing happens in the main thread when collecting statuses and shouldn't have races.\r\n* `concurrent.futures` works great here, but is Python 3 only. I'm not sure how hard this is to do in a compatible way.\r\n\r\n@asottile what do you think? Is this too complicated to be worth pursuing?","author":{"url":"https://github.com/chriskuehl","@type":"Person","name":"chriskuehl"},"datePublished":"2017-03-25T19:27:44Z","url":"https://github.com/pre-commit/pre-commit/issues/510"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:62090cb1-8422-8b6e-476e-40cd68f7fcc3
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA622:48D18:1A17FC0:223BF34:6B0677C0
html-safe-noncea2d668ad412ee7bad27dbf441094e9f48a6593f6e4cc3d0a3be710350ca3c2fa
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjIyOjQ4RDE4OjFBMTdGQzA6MjIzQkYzNDo2QjA2NzdDMCIsInZpc2l0b3JfaWQiOiIzODYyMzg1OTgxNzkzNTQ1NjAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac6fcd6efe0cd68d5072a2135493da2d373c1580dd987e80a22dafe24253db0862
hovercard-subject-tagissue:216997760
github-keyboard-shortcutsrepository,issues,commits,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/pre-commit/pre-commit/510/issue_layout
twitter:imagehttps://opengraph.githubassets.com/5bb7c9893657da07bc153c53b29c40e84148b48e0c3799d48e7319be70b49a07/pre-commit/pre-commit/issues/510
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/5bb7c9893657da07bc153c53b29c40e84148b48e0c3799d48e7319be70b49a07/pre-commit/pre-commit/issues/510
og:image:altI have this one hook that runs puppet parser validate which is extremely slow. Running it on just 185 files takes 105 seconds which makes my tests (which call pre-commit run --all-files, among othe...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamechriskuehl
hostnamegithub.com
expected-hostnamegithub.com
None4462ff7ebfd3d551f202659f2423dae617b6849d23b1df6465dc504ef497d14a
turbo-cache-controlno-preview
go-importgithub.com/pre-commit/pre-commit git https://github.com/pre-commit/pre-commit.git
octolytics-dimension-user_id6943086
octolytics-dimension-user_loginpre-commit
octolytics-dimension-repository_id17689377
octolytics-dimension-repository_nwopre-commit/pre-commit
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id17689377
octolytics-dimension-repository_network_root_nwopre-commit/pre-commit
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
release6d3909414814ff86ce7da4c51a0f4918a13fb41b
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/pre-commit/pre-commit/issues/510#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpre-commit%2Fpre-commit%2Fissues%2F510
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpre-commit%2Fpre-commit%2Fissues%2F510
Sign uphttps://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=pre-commit%2Fpre-commit
Reloadhttps://github.com/pre-commit/pre-commit/issues/510
Reloadhttps://github.com/pre-commit/pre-commit/issues/510
Reloadhttps://github.com/pre-commit/pre-commit/issues/510
pre-commithttps://github.com/pre-commit
pre-commithttps://github.com/pre-commit/pre-commit
Codehttps://github.com/pre-commit/pre-commit
Issues17 (17)https://github.com/pre-commit/pre-commit/issues
Pull requests8 (8)https://github.com/pre-commit/pre-commit/pulls
Actionshttps://github.com/pre-commit/pre-commit/actions
Security and qualityhttps://github.com/pre-commit/pre-commit/security
Insightshttps://github.com/pre-commit/pre-commit/insights
https://github.com/pre-commit/pre-commit
New issuehttps://github.com/login?return_to=https://github.com/pre-commit/pre-commit/issues/510
New issuehttps://github.com/login?return_to=https://github.com/pre-commit/pre-commit/issues/510
Parallel execution of individual hooks?https://github.com/pre-commit/pre-commit/issues/510#top
featurehttps://github.com/pre-commit/pre-commit/issues?q=state%3Aopen%20label%3A%22feature%22
questionhttps://github.com/pre-commit/pre-commit/issues?q=state%3Aopen%20label%3A%22question%22
https://github.com/chriskuehl
chriskuehlhttps://github.com/chriskuehl
on Mar 25, 2017https://github.com/pre-commit/pre-commit/issues/510#issue-216997760
https://i.fluffy.cc/t43V5vqd3VH9lTQfl8djnfZWBV2zDDTZ.htmlhttps://i.fluffy.cc/t43V5vqd3VH9lTQfl8djnfZWBV2zDDTZ.html
@asottilehttps://github.com/asottile
chriskuehlhttps://github.com/chriskuehl
featurehttps://github.com/pre-commit/pre-commit/issues?q=state%3Aopen%20label%3A%22feature%22
questionhttps://github.com/pre-commit/pre-commit/issues?q=state%3Aopen%20label%3A%22question%22
on Mar 25, 2017https://github.com/pre-commit/pre-commit/issues/510#event-1015446692
https://github.com/asottile
asottilehttps://github.com/asottile
on Mar 25, 2017https://github.com/pre-commit/pre-commit/issues/510#issuecomment-289234664
https://github.com/asottile
asottilehttps://github.com/asottile
on Mar 25, 2017https://github.com/pre-commit/pre-commit/issues/510#issuecomment-289234789
https://github.com/asottile
asottilehttps://github.com/asottile
on Mar 25, 2017https://github.com/pre-commit/pre-commit/issues/510#issuecomment-289235209
https://github.com/chriskuehl
chriskuehlhttps://github.com/chriskuehl
on Mar 25, 2017https://github.com/pre-commit/pre-commit/issues/510#issuecomment-289237573
https://github.com/asottile
asottilehttps://github.com/asottile
on Mar 25, 2017https://github.com/pre-commit/pre-commit/issues/510#issuecomment-289237971
https://github.com/asottile
asottilehttps://github.com/asottile
on Jul 28, 2017https://github.com/pre-commit/pre-commit/issues/510#issuecomment-318727460
@chriskuehlhttps://github.com/chriskuehl
asottilehttps://github.com/asottile
completedhttps://github.com/pre-commit/pre-commit/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#851https://github.com/pre-commit/pre-commit/pull/851
on Nov 2, 2018https://github.com/pre-commit/pre-commit/issues/510#event-1941969045
https://github.com/asottile
asottilehttps://github.com/asottile
on Dec 20, 2018https://github.com/pre-commit/pre-commit/issues/510#issuecomment-449130663
v1.13.0https://github.com/pre-commit/pre-commit/releases/tag/v1.13.0
https://github.com/avegancafe
avegancafehttps://github.com/avegancafe
on Jan 24, 2025https://github.com/pre-commit/pre-commit/issues/510#issuecomment-2613372043
pre-commithttps://github.com/pre-commit
on Jan 24, 2025https://github.com/pre-commit/pre-commit/issues/510#event-16064122656
Sign up for freehttps://github.com/signup?return_to=https://github.com/pre-commit/pre-commit/issues/510
Sign in to commenthttps://github.com/login?return_to=https://github.com/pre-commit/pre-commit/issues/510
featurehttps://github.com/pre-commit/pre-commit/issues?q=state%3Aopen%20label%3A%22feature%22
questionhttps://github.com/pre-commit/pre-commit/issues?q=state%3Aopen%20label%3A%22question%22
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.