René's URL Explorer Experiment


Title: fs.globSync: time grows quadratically with the number of brace expansions · Issue #67711 · nodejs/node · GitHub

Open Graph Title: fs.globSync: time grows quadratically with the number of brace expansions · Issue #67711 · nodejs/node

X Title: fs.globSync: time grows quadratically with the number of brace expansions · Issue #67711 · nodejs/node

Description: Version v26.13.1 Platform Windows 11 x64 (10.0.26300) Subsystem fs (fs.glob, fs.globSync) What steps will reproduce the bug? Save as repro.mjs and run node repro.mjs 15 2, then node repro.mjs 7 4. It globs a pattern of N brace groups wit...

Open Graph Description: Version v26.13.1 Platform Windows 11 x64 (10.0.26300) Subsystem fs (fs.glob, fs.globSync) What steps will reproduce the bug? Save as repro.mjs and run node repro.mjs 15 2, then node repro.mjs 7 4. ...

X Description: Version v26.13.1 Platform Windows 11 x64 (10.0.26300) Subsystem fs (fs.glob, fs.globSync) What steps will reproduce the bug? Save as repro.mjs and run node repro.mjs 15 2, then node repro.mjs 7 4. ...

Opengraph URL: https://github.com/nodejs/node/issues/67711

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.113.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fs.globSync: time grows quadratically with the number of brace expansions","articleBody":"### Version\n\nv26.13.1\n\n### Platform\n\n```text\nWindows 11 x64 (10.0.26300)\n```\n\n### Subsystem\n\nfs (`fs.glob`, `fs.globSync`)\n\n### What steps will reproduce the bug?\n\nSave as `repro.mjs` and run `node repro.mjs 15 2`, then `node repro.mjs 7 4`. It globs a pattern of N brace groups with K alternatives each, such as `{a,b}{a,b}{a,b}.html`, in an empty temporary folder. It has no dependencies.\n\n```js\n// Time fs.globSync on a pattern of N brace groups of K alternatives each, in an empty folder.\nimport fs from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\nconst dir = fs.mkdtempSync(path.join(os.tmpdir(), \"brace-\"));\nconst max = Number(process.argv[2] ?? 14);\nconst alts = Number(process.argv[3] ?? 2);\nfor (let n = 1; n \u003c= max; n += 1) {\n  const group = `{${Array.from({ length: alts }, (_, i) => String.fromCharCode(97 + i)).join(\",\")}}`;\n  const pattern = group.repeat(n) + \".html\";\n  const start = performance.now();\n  fs.globSync(pattern, { cwd: dir });\n  console.log(`node ${process.version} groups=${n} alternatives=${alts} expansions=${alts ** n} ${(performance.now() - start).toFixed(1)} ms`);\n}\nfs.rmSync(dir, { recursive: true });\n```\n\n### How often does it reproduce? Is there a required condition?\n\nEvery run. The only condition is a pattern whose braces expand to thousands of patterns. The folder can be empty.\n\n### What is the expected behavior? Why is that the expected behavior?\n\nTime roughly proportional to the number of expanded patterns. With no files to match, each pattern should cost about the same however many there are.\n\n### What do you see instead?\n\nThe cost of each pattern grows with the number of patterns, so the total grows roughly quadratically:\n\n```text\ngroups=10 alternatives=2 expansions=1024     56.2 ms   (~55 µs per pattern)\ngroups=11 alternatives=2 expansions=2048    115.6 ms\ngroups=12 alternatives=2 expansions=4096    272.9 ms\ngroups=13 alternatives=2 expansions=8192    729.7 ms\ngroups=14 alternatives=2 expansions=16384  4660.6 ms\ngroups=15 alternatives=2 expansions=32768 28038.2 ms   (~856 µs per pattern)\n\ngroups=5 alternatives=4 expansions=1024     56.5 ms\ngroups=6 alternatives=4 expansions=4096    254.6 ms\ngroups=7 alternatives=4 expansions=16384  1777.6 ms\n```\n\nAt the same expansion count (16,384), two-way groups are slower than four-way groups (4.7 s vs 1.8 s), so the cost also depends on how the groups nest, not only on the number of patterns. A CLI that passes a user's glob to `fs.globSync` looks hung on a pattern like this, with no error.\n\n### Additional information\n\nMeasured on Windows only. We now refuse globs that expand to more than 1,024 patterns before calling `fs.globSync`.\n","author":{"url":"https://github.com/gustavohrm","@type":"Person","name":"gustavohrm"},"datePublished":"2026-11-22T21:21:50Z","url":"https://github.com/nodejs/node/issues/67711"}

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:50cd3787-84e0-7e04-7da4-6f1a115a2fdf
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9586:12B33:3BEBB6:4E22F8:6B061973
html-safe-nonce6cce11b0818bada4027ee966ed42391adceb7da5547b1e8d9a0b6206c9b06482
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTg2OjEyQjMzOjNCRUJCNjo0RTIyRjg6NkIwNjE5NzMiLCJ2aXNpdG9yX2lkIjoiNzE2NDkwMzEyNTQ1ODIyOTYxOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace0cdd89a9ad1492212ca4bba122cab36f19887f8ff610e7cace1612287dbaf7b
hovercard-subject-tagissue:6547953206
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/nodejs/node/67711/issue_layout
twitter:imagehttps://opengraph.githubassets.com/22044cb44a5fdd4f81ae3abdd61d01badca8a30116048630a8bec34ae23a4d70/nodejs/node/issues/67711
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/22044cb44a5fdd4f81ae3abdd61d01badca8a30116048630a8bec34ae23a4d70/nodejs/node/issues/67711
og:image:altVersion v26.13.1 Platform Windows 11 x64 (10.0.26300) Subsystem fs (fs.glob, fs.globSync) What steps will reproduce the bug? Save as repro.mjs and run node repro.mjs 15 2, then node repro.mjs 7 4. ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamegustavohrm
hostnamegithub.com
expected-hostnamegithub.com
None97d4714e567728e1f85f88b0cf68c89f0f8a3dc41e8869af7aeb8195ad990374
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
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
release866f202ebf7ac5aff8f633417d9fd8a53818a977
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/nodejs/node/issues/67711#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F67711
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%2Fnodejs%2Fnode%2Fissues%2F67711
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=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/67711
Reloadhttps://github.com/nodejs/node/issues/67711
Reloadhttps://github.com/nodejs/node/issues/67711
nodejshttps://github.com/nodejs
nodehttps://github.com/nodejs/node
Codehttps://github.com/nodejs/node
Issues630 (630)https://github.com/nodejs/node/issues
Pull requests659 (659)https://github.com/nodejs/node/pulls
Actionshttps://github.com/nodejs/node/actions
Projectshttps://github.com/nodejs/node/projects
Security and qualityhttps://github.com/nodejs/node/security
Insightshttps://github.com/nodejs/node/insights
https://github.com/nodejs/node
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/67711
New issuehttps://github.com/login?return_to=https://github.com/nodejs/node/issues/67711
#67713https://github.com/nodejs/node/pull/67713
fs.globSync: time grows quadratically with the number of brace expansionshttps://github.com/nodejs/node/issues/67711#top
#67713https://github.com/nodejs/node/pull/67713
dependencieshttps://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22dependencies%22
v24.xhttps://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22v24.x%22
v26.xhttps://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22v26.x%22
https://github.com/gustavohrm
gustavohrmhttps://github.com/gustavohrm
on Nov 22, 2026https://github.com/nodejs/node/issues/67711#issue-6547953206
https://github.com/gustavohrm
gustavohrmhttps://github.com/gustavohrm
on Nov 22, 2026https://github.com/nodejs/node/issues/67711#issuecomment-7086112471
isaacs/minimatch@70f442dfhttps://github.com/isaacs/minimatch/commit/70f442df
GHSA-g3hv-75wg-m249https://github.com/advisories/GHSA-g3hv-75wg-m249
Renegade334https://github.com/Renegade334
dependencieshttps://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22dependencies%22
v24.xhttps://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22v24.x%22
v26.xhttps://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22v26.x%22
on Nov 22, 2026https://github.com/nodejs/node/issues/67711#event-36951308111
Renegade334https://github.com/Renegade334
[v26.x] deps: update minimatch to 11.0.9 #67713https://github.com/nodejs/node/pull/67713
on Nov 23, 2026https://github.com/nodejs/node/issues/67711#event-37023203804
Sign up for freehttps://github.com/signup?return_to=https://github.com/nodejs/node/issues/67711
Sign in to commenthttps://github.com/login?return_to=https://github.com/nodejs/node/issues/67711
dependencieshttps://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22dependencies%22
v24.xhttps://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22v24.x%22
v26.xhttps://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22v26.x%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.