René's URL Explorer Experiment


Title: Index brace and pipeline lookups during formatting by PrzemyslawKlys · Pull Request #2224 · PowerShell/PSScriptAnalyzer · GitHub

Open Graph Title: Index brace and pipeline lookups during formatting by PrzemyslawKlys · Pull Request #2224 · PowerShell/PSScriptAnalyzer

X Title: Index brace and pipeline lookups during formatting by PrzemyslawKlys · Pull Request #2224 · PowerShell/PSScriptAnalyzer

Description: PR Summary Formatting large merged modules repeatedly scans the token array for script-block braces and scans earlier pipelines for each token. Index brace tokens by offset and pipeline endings by line, preserving the existing first-match selection and AST order. This changes no public API or formatting output. On PowerForge-merged repository functions from Locksmith and PSWriteHTML, the formatted PSM1 and original manifest bytes match unchanged upstream (411c3d0) exactly. Mean warmed Invoke-Formatter time over three rotated samples: Workload / L3 domain Upstream This change Locksmith, 256 KB merged PSM1 / 0xFFFF 442 ms 242 ms PSWriteHTML, 1.49 MB merged PSM1 / 0xFFFF 3,387 ms 1,138 ms Locksmith / 0xFFFF0000 315 ms 214 ms PSWriteHTML / 0xFFFF0000 2,035 ms 1,353 ms These are local PowerShell 7.6.6 measurements on a Ryzen 9 9950X3D2. Comparisons are pinned to one L3 domain at a time: three rotated samples on 0xFFFF, two on 0xFFFF0000, retaining every sample. Each sample uses a fresh process; startup/import are excluded, and four workload passes are discarded before the warm measurement. Two small PSWriteHTML function files take about 10 ms together with either version. First-call timings do not show a consistent improvement. The merged workloads exclude optional dependency inlining and module execution and use the same six formatting rules. This optimization is independent of #2206's command-discovery changes. Release builds passed for net8 and net462. The TokenOperations, InvokeFormatter, UseConsistentIndentation, PlaceOpenBrace and PlaceCloseBrace suites passed: 157 tests on PowerShell 7; 155 tests and two platform skips on Windows PowerShell 5.1. The new test checks brace selection and nested AST ordering. PR Checklist PR has a meaningful title Summarized changes Change is not breaking Changed source and test files have the correct copyright header Added a test for brace selection and ordering; existing indentation tests cover pipeline matching This PR is ready for review and is not Work in Progress

Open Graph Description: PR Summary Formatting large merged modules repeatedly scans the token array for script-block braces and scans earlier pipelines for each token. Index brace tokens by offset and pipeline endings by ...

X Description: PR Summary Formatting large merged modules repeatedly scans the token array for script-block braces and scans earlier pipelines for each token. Index brace tokens by offset and pipeline endings by ...

Opengraph URL: https://github.com/PowerShell/PSScriptAnalyzer/pull/2224

X: @github

direct link

Domain: github.com

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:e272e24f-5b13-ebe9-bb76-fca7f3240c69
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id867C:25B4D3:C1DDE2:10AA50A:6AFD438F
html-safe-nonce25bd02ec12b45cdca8e80f1d226f4315eb8b6584c78686eb6f3d73a2abe666fc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NjdDOjI1QjREMzpDMURERTI6MTBBQTUwQTo2QUZENDM4RiIsInZpc2l0b3JfaWQiOiI2ODgwMTY3NjA3MTQ0MzY2OTkxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac004f97900fdc6598d13d91942237b52f841f1fd630c33d473bd980985676c1d3
hovercard-subject-tagpull_request:4785638185
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/PowerShell/PSScriptAnalyzer/pull/2224/files
twitter:imagehttps://avatars.githubusercontent.com/u/15063294?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/15063294?s=400&v=4
og:image:altPR Summary Formatting large merged modules repeatedly scans the token array for script-block braces and scans earlier pipelines for each token. Index brace tokens by offset and pipeline endings by ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonebdbacc25b921224ff0befcb9e629560a1255be51aec9991d6e3f95b5e9151474
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/PowerShell/PSScriptAnalyzer git https://github.com/PowerShell/PSScriptAnalyzer.git
octolytics-dimension-user_id11524380
octolytics-dimension-user_loginPowerShell
octolytics-dimension-repository_id33149177
octolytics-dimension-repository_nwoPowerShell/PSScriptAnalyzer
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id33149177
octolytics-dimension-repository_network_root_nwoPowerShell/PSScriptAnalyzer
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
release556dd37bb0aceffb25724e151b5d858b3265b40b
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FPowerShell%2FPSScriptAnalyzer%2Fpull%2F2224%2Ffiles
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%2FPowerShell%2FPSScriptAnalyzer%2Fpull%2F2224%2Ffiles
Sign uphttps://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=PowerShell%2FPSScriptAnalyzer
Reloadhttps://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files
Reloadhttps://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files
Reloadhttps://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files
PowerShellhttps://github.com/PowerShell
PSScriptAnalyzerhttps://github.com/PowerShell/PSScriptAnalyzer
Codehttps://github.com/PowerShell/PSScriptAnalyzer
Issues407 (407)https://github.com/PowerShell/PSScriptAnalyzer/issues
Pull requests34 (34)https://github.com/PowerShell/PSScriptAnalyzer/pulls
Discussionshttps://github.com/PowerShell/PSScriptAnalyzer/discussions
Actionshttps://github.com/PowerShell/PSScriptAnalyzer/actions
Projectshttps://github.com/PowerShell/PSScriptAnalyzer/projects
Wikihttps://github.com/PowerShell/PSScriptAnalyzer/wiki
Security and qualityhttps://github.com/PowerShell/PSScriptAnalyzer/security
Insightshttps://github.com/PowerShell/PSScriptAnalyzer/insights
Sign up for GitHub https://github.com/signup?return_to=%2FPowerShell%2FPSScriptAnalyzer%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2FPowerShell%2FPSScriptAnalyzer%2Fissues%2Fnew%2Fchoose
Przemysław Kłys (PrzemyslawKlys)https://github.com/PrzemyslawKlys
PowerShell:mainhttps://github.com/PowerShell/PSScriptAnalyzer/tree/main
PrzemyslawKlys:fix/formatter-token-indexhttps://github.com/PrzemyslawKlys/PSScriptAnalyzer/tree/fix/formatter-token-index
Conversation 2 https://github.com/PowerShell/PSScriptAnalyzer/pull/2224
Commits 1 https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/commits
Checks 1 https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/checks
Files changed https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files
Index brace and pipeline lookups during formatting https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#top
Show all changes 1 commit https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files
9ea3dc5 Index brace and pipeline lookups during formatting PrzemyslawKlys Oct 8, 2026 https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/commits/9ea3dc525c0586f35720c510f4bea3b7a202a60c
Clear filters https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files
Please reload this pagehttps://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files
TokenOperations.cs https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#diff-1dcb395d75f8305404c42b1139f791e6fede18e5ade0e6859578e22befe1d145
UseConsistentIndentation.cs https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#diff-b941a26916664319ebb13944c360128a3d2ef19d0dcfd02f0ec2628667f119d9
TokenOperations.tests.ps1 https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#diff-17eede2b1a542fbe7631b246ab7c9f294334bc030ff55705336bdd185a4f6a01
https://github.com/PowerShell/PSScriptAnalyzer/blob/main/.github/CODEOWNERS#L2
Engine/TokenOperations.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#diff-1dcb395d75f8305404c42b1139f791e6fede18e5ade0e6859578e22befe1d145
View file https://github.com/PrzemyslawKlys/PSScriptAnalyzer/blob/9ea3dc525c0586f35720c510f4bea3b7a202a60c/Engine/TokenOperations.cs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/{{ revealButtonHref }}
https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#diff-1dcb395d75f8305404c42b1139f791e6fede18e5ade0e6859578e22befe1d145
https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#diff-1dcb395d75f8305404c42b1139f791e6fede18e5ade0e6859578e22befe1d145
https://github.com/PowerShell/PSScriptAnalyzer/blob/main/.github/CODEOWNERS#L2
Rules/UseConsistentIndentation.cshttps://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#diff-b941a26916664319ebb13944c360128a3d2ef19d0dcfd02f0ec2628667f119d9
View file https://github.com/PrzemyslawKlys/PSScriptAnalyzer/blob/9ea3dc525c0586f35720c510f4bea3b7a202a60c/Rules/UseConsistentIndentation.cs
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/{{ revealButtonHref }}
https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#diff-b941a26916664319ebb13944c360128a3d2ef19d0dcfd02f0ec2628667f119d9
https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#diff-b941a26916664319ebb13944c360128a3d2ef19d0dcfd02f0ec2628667f119d9
https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#diff-b941a26916664319ebb13944c360128a3d2ef19d0dcfd02f0ec2628667f119d9
https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#diff-b941a26916664319ebb13944c360128a3d2ef19d0dcfd02f0ec2628667f119d9
https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#diff-b941a26916664319ebb13944c360128a3d2ef19d0dcfd02f0ec2628667f119d9
https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#diff-b941a26916664319ebb13944c360128a3d2ef19d0dcfd02f0ec2628667f119d9
https://github.com/PowerShell/PSScriptAnalyzer/blob/main/.github/CODEOWNERS#L2
Tests/Engine/TokenOperations.tests.ps1https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#diff-17eede2b1a542fbe7631b246ab7c9f294334bc030ff55705336bdd185a4f6a01
View file https://github.com/PrzemyslawKlys/PSScriptAnalyzer/blob/9ea3dc525c0586f35720c510f4bea3b7a202a60c/Tests/Engine/TokenOperations.tests.ps1
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/{{ revealButtonHref }}
https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#diff-17eede2b1a542fbe7631b246ab7c9f294334bc030ff55705336bdd185a4f6a01
https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#diff-17eede2b1a542fbe7631b246ab7c9f294334bc030ff55705336bdd185a4f6a01
https://github.com/PowerShell/PSScriptAnalyzer/pull/2224/files#diff-17eede2b1a542fbe7631b246ab7c9f294334bc030ff55705336bdd185a4f6a01
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.