René's URL Explorer Experiment


Title: perf(language-service): lighter analysis trigger for project initialization by kbrilla · Pull Request #66964 · angular/angular · GitHub

Open Graph Title: perf(language-service): lighter analysis trigger for project initialization by kbrilla · Pull Request #66964 · angular/angular

X Title: perf(language-service): lighter analysis trigger for project initialization by kbrilla · Pull Request #66964 · angular/angular

Description: PR: perf(language-service): lighter analysis trigger for project initialization Description Replaces getSemanticDiagnostics() with a lighter ensureProjectAnalyzed() call during project initialization. When a project loads, the language service previously called getSemanticDiagnostics(firstRootFile) to trigger Angular compilation — but this also performed unnecessary per-file TypeScript type checking that was never consumed. The new ensureProjectAnalyzed() method triggers only the Angular analysis pipeline (analyzeSync + resolveCompilation) without running per-file diagnostics, saving 50–500ms per project load depending on file complexity. Problem When a project loads, runGlobalAnalysisForNewlyLoadedProject() calls: project.getLanguageService().getSemanticDiagnostics(fileName) Through the plugin wrapper in ts_plugin.ts, this triggers: tsLS.getSemanticDiagnostics(fileName) — full TypeScript semantic analysis on the first root file (wasted) ngLS.getSemanticDiagnostics(fileName) → compiler.getDiagnosticsForFile() — Angular analysis + per-file template type checking + additional checks (only analysis is needed) The results from both calls are discarded — the only purpose was to initialize the Angular compiler. Solution Added a new ensureProjectAnalyzed() method to the NgLanguageService API that triggers only the Angular compiler's analysis pipeline: ensureProjectAnalyzed(): void { const compiler = this.compilerFactory.getOrCreate(); compiler['ensureAnalyzed'](); // private API, established pattern in LS refactoring code } This uses compiler['ensureAnalyzed']() which directly invokes the private ensureAnalyzed() method on NgCompiler. We are aware this accesses a private API, but it is an established pattern already used in 4 other places in the language service codebase: src/refactorings/convert_to_signal_input/full_class_input_refactoring.ts src/refactorings/convert_to_signal_input/individual_input_refactoring.ts src/refactorings/convert_to_signal_queries/individual_query_refactoring.ts src/refactorings/convert_to_signal_queries/full_class_query_refactoring.ts Given that ensureAnalyzed() is used in 5 places across the language service (including this PR), it may be worth considering making it part of the NgCompiler public API to formalize this usage pattern. Alternative considered A public API alternative is compiler.getTemplateTypeChecker(), which calls ensureAnalyzed() internally and returns the TemplateTypeChecker instance (unused). Both approaches are functionally equivalent and pass all tests. The private API approach was chosen for clarity of intent — we're explicitly triggering analysis, not requesting a type checker. Changes File Change packages/language-service/api.ts Added ensureProjectAnalyzed() to NgLanguageService interface packages/language-service/src/language_service.ts Implemented ensureProjectAnalyzed() packages/language-service/src/ts_plugin.ts Exposed ensureProjectAnalyzed in the plugin object vscode-ng-language-service/server/src/session.ts Replaced getSemanticDiagnostics(fileName) with ensureProjectAnalyzed() in runGlobalAnalysisForNewlyLoadedProject() packages/language-service/test/legacy/ts_plugin_spec.ts Added test verifying ensureProjectAnalyzed() initializes the compiler Impact Saves 50–500ms per project load (varies by first root file complexity) No change to observable behavior — diagnostics are still computed on first pull/push request Independent — can be merged independently of other performance PRs Testing All existing language service tests pass (modern + legacy) New test added in ts_plugin_spec.ts verifying that ensureProjectAnalyzed() properly initializes the Angular compiler state Verified both getTemplateTypeChecker() and compiler['ensureAnalyzed']() approaches pass all tests Breaking Changes None Related Complements #66700 (Pull-Based Diagnostics) and #66668 (Client-Side File Watching) AI Disclosure This PR was developed using Claude Opus 4 AI assistant under human orchestration and review by @kbrilla. Integration See #66967 for integration with Progressive Project Initialization and Pull-Based Diagnostics, which improves how these features work together.

Open Graph Description: PR: perf(language-service): lighter analysis trigger for project initialization Description Replaces getSemanticDiagnostics() with a lighter ensureProjectAnalyzed() call during project initializati...

X Description: PR: perf(language-service): lighter analysis trigger for project initialization Description Replaces getSemanticDiagnostics() with a lighter ensureProjectAnalyzed() call during project initializati...

Opengraph URL: https://github.com/angular/angular/pull/66964

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:7ce5dd0d-e6e8-844d-4da0-fd644137c784
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE00E:7A60E:3619B66:456A2AE:6B01E628
html-safe-nonce0c39d553da020723e51d751049c164afe0f7179334c82b3d19b19cd4f839481f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDBFOjdBNjBFOjM2MTlCNjY6NDU2QTJBRTo2QjAxRTYyOCIsInZpc2l0b3JfaWQiOiI0NjE0NjY0MDU2MDU2NDQwMzYwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac395d0d0e829ec5e78f78c859fe04594270b9b0b7c7e6c1b717d640f64c13561a
hovercard-subject-tagpull_request:3260283454
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/angular/angular/pull/66964/files
twitter:imagehttps://avatars.githubusercontent.com/u/22288449?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/22288449?s=400&v=4
og:image:altPR: perf(language-service): lighter analysis trigger for project initialization Description Replaces getSemanticDiagnostics() with a lighter ensureProjectAnalyzed() call during project initializati...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/angular/angular git https://github.com/angular/angular.git
octolytics-dimension-user_id139426
octolytics-dimension-user_loginangular
octolytics-dimension-repository_id24195339
octolytics-dimension-repository_nwoangular/angular
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id24195339
octolytics-dimension-repository_network_root_nwoangular/angular
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/angular/angular/pull/66964/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fangular%2Fangular%2Fpull%2F66964%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%2Fangular%2Fangular%2Fpull%2F66964%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=angular%2Fangular
Reloadhttps://github.com/angular/angular/pull/66964/files
Reloadhttps://github.com/angular/angular/pull/66964/files
Reloadhttps://github.com/angular/angular/pull/66964/files
angularhttps://github.com/angular
angularhttps://github.com/angular/angular
Codehttps://github.com/angular/angular
Issues835 (835)https://github.com/angular/angular/issues
Pull requests143 (143)https://github.com/angular/angular/pulls
Discussionshttps://github.com/angular/angular/discussions
Actionshttps://github.com/angular/angular/actions
Projectshttps://github.com/angular/angular/projects
Security and quality40 (40)https://github.com/angular/angular/security
Insightshttps://github.com/angular/angular/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fangular%2Fangular%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fangular%2Fangular%2Fissues%2Fnew%2Fchoose
thePunderWomanhttps://github.com/thePunderWoman
angular:mainhttps://github.com/angular/angular/tree/main
kbrilla:perf/lighter-analysis-triggerhttps://github.com/kbrilla/angular/tree/perf/lighter-analysis-trigger
Conversation 11 https://github.com/angular/angular/pull/66964
Commits 1 https://github.com/angular/angular/pull/66964/commits
Checks 18 https://github.com/angular/angular/pull/66964/checks
Files changed https://github.com/angular/angular/pull/66964/files
Please reload this pagehttps://github.com/angular/angular/pull/66964/files
perf(language-service): lighter analysis trigger for project initialization https://github.com/angular/angular/pull/66964/files#top
Show all changes 1 commit https://github.com/angular/angular/pull/66964/files
6a94a2f perf(language-service): use lightweight project warmup for Angular an… kbrilla Feb 19, 2026 https://github.com/angular/angular/pull/66964/commits/6a94a2f37dc7f56b2a94e3ca178e6ea7313a0d35
Clear filters https://github.com/angular/angular/pull/66964/files
Please reload this pagehttps://github.com/angular/angular/pull/66964/files
Please reload this pagehttps://github.com/angular/angular/pull/66964/files
api.ts https://github.com/angular/angular/pull/66964/files#diff-7cb5687cda4f32e62090e4810eba97aa3c5fe2c1855e3c728f58418b81e2f455
language_service.ts https://github.com/angular/angular/pull/66964/files#diff-612cc2e10a72c69cbd24ffce20d68d90d8826ea879978f9ef24471265491384a
ts_plugin.ts https://github.com/angular/angular/pull/66964/files#diff-d101cf9913b0899c7728f93db6b858a1fd05a0605cc0ea14dd97db2dc28a4c28
ts_plugin_spec.ts https://github.com/angular/angular/pull/66964/files#diff-78f63044cb31c24737ab7f7bf8a4ef409db9d8c88d7775f306c881dbe3b6af0d
session.ts https://github.com/angular/angular/pull/66964/files#diff-2aa1314c29a6da3788ba851838ec44db8fefb023c04ba6f8c2609ee65b670f3d
packages/language-service/api.tshttps://github.com/angular/angular/pull/66964/files#diff-7cb5687cda4f32e62090e4810eba97aa3c5fe2c1855e3c728f58418b81e2f455
View file https://github.com/kbrilla/angular/blob/6a94a2f37dc7f56b2a94e3ca178e6ea7313a0d35/packages/language-service/api.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/66964/{{ revealButtonHref }}
https://github.com/angular/angular/pull/66964/files#diff-7cb5687cda4f32e62090e4810eba97aa3c5fe2c1855e3c728f58418b81e2f455
atscotthttps://github.com/atscott
Feb 9, 2026https://github.com/angular/angular/pull/66964/files#r2784109931
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/angular/angular/pull/66964/files
https://github.com/angular/angular/pull/66964/files#diff-7cb5687cda4f32e62090e4810eba97aa3c5fe2c1855e3c728f58418b81e2f455
packages/language-service/src/language_service.tshttps://github.com/angular/angular/pull/66964/files#diff-612cc2e10a72c69cbd24ffce20d68d90d8826ea879978f9ef24471265491384a
View file https://github.com/kbrilla/angular/blob/6a94a2f37dc7f56b2a94e3ca178e6ea7313a0d35/packages/language-service/src/language_service.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/66964/{{ revealButtonHref }}
https://github.com/angular/angular/pull/66964/files#diff-612cc2e10a72c69cbd24ffce20d68d90d8826ea879978f9ef24471265491384a
https://github.com/angular/angular/pull/66964/files#diff-612cc2e10a72c69cbd24ffce20d68d90d8826ea879978f9ef24471265491384a
packages/language-service/src/ts_plugin.tshttps://github.com/angular/angular/pull/66964/files#diff-d101cf9913b0899c7728f93db6b858a1fd05a0605cc0ea14dd97db2dc28a4c28
View file https://github.com/kbrilla/angular/blob/6a94a2f37dc7f56b2a94e3ca178e6ea7313a0d35/packages/language-service/src/ts_plugin.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/66964/{{ revealButtonHref }}
https://github.com/angular/angular/pull/66964/files#diff-d101cf9913b0899c7728f93db6b858a1fd05a0605cc0ea14dd97db2dc28a4c28
https://github.com/angular/angular/pull/66964/files#diff-d101cf9913b0899c7728f93db6b858a1fd05a0605cc0ea14dd97db2dc28a4c28
packages/language-service/test/legacy/ts_plugin_spec.tshttps://github.com/angular/angular/pull/66964/files#diff-78f63044cb31c24737ab7f7bf8a4ef409db9d8c88d7775f306c881dbe3b6af0d
View file https://github.com/kbrilla/angular/blob/6a94a2f37dc7f56b2a94e3ca178e6ea7313a0d35/packages/language-service/test/legacy/ts_plugin_spec.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/66964/{{ revealButtonHref }}
https://github.com/angular/angular/pull/66964/files#diff-78f63044cb31c24737ab7f7bf8a4ef409db9d8c88d7775f306c881dbe3b6af0d
vscode-ng-language-service/server/src/session.tshttps://github.com/angular/angular/pull/66964/files#diff-2aa1314c29a6da3788ba851838ec44db8fefb023c04ba6f8c2609ee65b670f3d
View file https://github.com/kbrilla/angular/blob/6a94a2f37dc7f56b2a94e3ca178e6ea7313a0d35/vscode-ng-language-service/server/src/session.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/angular/angular/pull/66964/{{ revealButtonHref }}
https://github.com/angular/angular/pull/66964/files#diff-2aa1314c29a6da3788ba851838ec44db8fefb023c04ba6f8c2609ee65b670f3d
https://github.com/angular/angular/pull/66964/files#diff-2aa1314c29a6da3788ba851838ec44db8fefb023c04ba6f8c2609ee65b670f3d
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.