Title: Angular Router numeric query parameters can exhaust memory during SSR · Issue #70908 · angular/angular · GitHub
Open Graph Title: Angular Router numeric query parameters can exhaust memory during SSR · Issue #70908 · angular/angular
X Title: Angular Router numeric query parameters can exhaust memory during SSR · Issue #70908 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description #70717 fixed the numeric matrix-parameter case from #70716, but query parameters still use regular object assignment in parseQueryParam():...
Open Graph Description: Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description #70717 fixed the numeric matrix-parameter case from #70716, but query parameters still use regular...
X Description: Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description #70717 fixed the numeric matrix-parameter case from #70716, but query parameters still use regular...
Opengraph URL: https://github.com/angular/angular/issues/70908
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Angular Router numeric query parameters can exhaust memory during SSR","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nrouter\n\n### Is this a regression?\n\nNo\n\n### Description\n\n\n#70717 fixed the numeric matrix-parameter case from #70716, but query parameters still use regular object assignment in `parseQueryParam()`:\n\n```ts\nparams[decodedKey] = decodedVal;\n```\n\nNumeric query parameter names therefore still behave differently in V8.\n\nFor example:\n\n```text\n?0&17&34\n```\n\nis parsed as:\n\n```json\n{\n \"0\": \"\",\n \"17\": \"\",\n \"34\": \"\"\n}\n```\n\nIn my test this object retained around **558 KB**, while a similar nonnumeric control retained around **197 KB**.\n\nThe Router copies this map when creating URLs. An application can enable this globally with:\n\n```ts\nwithRouterConfig({\n defaultQueryParamsHandling: 'merge',\n})\n```\n\nso during SSR the cost is repeated for every RouterLink rendered on the page.\n\nI tested Angular **22.2.0 on Node.js 24** through Nginx with a **16,365-byte request line** containing 2,827 parameter names:\n\n| Links | 256 MiB | 512 MiB |\n| ---: | ---: | ---: |\n| 30 | 16 requests | |\n| 50 | 8 requests | 20 requests |\n| 75 | 6 requests | 12 requests |\n| 100 | 4 requests | 10 requests |\n\nThe byte-identical nonnumeric control completed successfully.\n\nFor comparison, the original matrix-parameter case on Angular 22.1.4 also required **4 requests at 256 MiB** and **10 requests at 512 MiB** with 100 links.\n\nAll failures were V8 heap OOMs:\n\n```text\nOOMKilled=false\n```\n\n### Please provide a link to a minimal reproduction of the bug\n\n \nhttps://github.com/SkyZeroZx/angular-router-ssr-oom-lab/tree/query-param-oom-angular-22.2.0","author":{"url":"https://github.com/SkyZeroZx","@type":"Person","name":"SkyZeroZx"},"datePublished":"2026-09-24T06:08:49Z","url":"https://github.com/angular/angular/issues/70908"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:ad6d592f-814c-f817-5dd0-eeaaa260188e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DCE8:26CF6F:6D2F50:9A078A:6AFDD11D |
| html-safe-nonce | 44ae13c882c97fd29dab161d80d4746a92b3acc4356ade87b6d81086fa7f4a5a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQ0U4OjI2Q0Y2Rjo2RDJGNTA6OUEwNzhBOjZBRkREMTFEIiwidmlzaXRvcl9pZCI6IjY2ODA0MTcyMzI3NTc1OTkwMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3083420cd58bf6b68c0175a8887f15e79da29ea8cb83bf24da1ef572a3cd5438 |
| hovercard-subject-tag | issue:5563939304 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/70908/issue_layout |
| twitter:image | https://opengraph.githubassets.com/26d11300ad6dbedc5270d0bbf6d6bc69f43ff6ba8cae055f993b541a88ba3e7e/angular/angular/issues/70908 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/26d11300ad6dbedc5270d0bbf6d6bc69f43ff6ba8cae055f993b541a88ba3e7e/angular/angular/issues/70908 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? router Is this a regression? No Description #70717 fixed the numeric matrix-parameter case from #70716, but query parameters still use regular... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | SkyZeroZx |
| hostname | github.com |
| expected-hostname | github.com |
| None | 26886a40b582b821a7a76351e0a2f42b6d6160854b6e2520db24f31fd7be5da7 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 68ebaa631a1d248d69ebde4b9c5defd3a19aeb2f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width