Skip to content

perf(vue-router): compact private reactivity - #7982

Draft
Sheraff wants to merge 5 commits into
mainfrom
codex/compact-vue-private-reactivity
Draft

perf(vue-router): compact private reactivity#7982
Sheraff wants to merge 5 commits into
mainfrom
codex/compact-vue-private-reactivity

Conversation

@Sheraff

@Sheraff Sheraff commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • keep each private IntersectionObserver in the watch cleanup closure that owns it instead of an unused returned ref
  • derive match and remount state from one active-match snapshot in the render that consumes it, removing a computed tuple
  • use vue-store identity selection without an extra callsite lambda, retained only after composed compression attribution
  • add focused observer lifecycle and remount-key tests

Bundle impact

Only the four Vue scenarios change; the other 13 are byte-identical. Every affected bundle is 130 raw bytes smaller. Gzip improves by 32-43 bytes and initial gzip by 33-45 bytes. Brotli changes by -50 to +25 bytes; the one +25 case is vue-start.full, which still improves by 32 gzip bytes.

For vue-router.full: -130 raw / -39 gzip / -22 Brotli bytes.
For vue-start.minimal: -130 raw / -43 gzip / -50 Brotli bytes.

The checked-in result report includes full hunk attribution, subset rejection data, artifact SHAs, and the selector composition ablation.

Validation

  • focused final candidate and exact-base parity: 2 files / 260 passed each
  • Vue Router unit: 54 files / 816 passed / 1 existing skip
  • Vue Router types: 17 files / 138 passed
  • Vue Router ESLint: 0 errors
  • Vue remount-dependencies e2e: 2 passed
  • exact full 17-scenario bundle matrix passed
  • five independent exact-HEAD reviews approved semantics, API boundaries, tests, runtime, and compression attribution

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 74adbf4d-fe86-4897-bbb4-0abb83255920

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@nx-cloud

nx-cloud Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit 7a01168

Command Status Duration Result
nx affected --targets=test:eslint,test:unit,tes... ✅ Succeeded 9m 32s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 2m 16s View ↗

☁️ Nx Cloud last updated this comment at 2026-08-06 07:40:24 UTC

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

5 package(s) bumped directly, 18 bumped as dependents.

🟩 Patch bumps

Package Version Reason
@tanstack/react-router 1.170.20 → 1.170.21 Changeset
@tanstack/router-core 1.171.17 → 1.171.18 Changeset
@tanstack/solid-router 1.170.20 → 1.170.21 Changeset
@tanstack/start-server-core 1.169.20 → 1.169.21 Changeset
@tanstack/vue-router 1.170.19 → 1.170.20 Changeset
@tanstack/react-start 1.168.37 → 1.168.38 Dependent
@tanstack/react-start-client 1.168.18 → 1.168.19 Dependent
@tanstack/react-start-rsc 0.1.36 → 0.1.37 Dependent
@tanstack/react-start-server 1.167.25 → 1.167.26 Dependent
@tanstack/router-cli 1.167.23 → 1.167.24 Dependent
@tanstack/router-generator 1.167.23 → 1.167.24 Dependent
@tanstack/router-plugin 1.168.25 → 1.168.26 Dependent
@tanstack/router-vite-plugin 1.167.25 → 1.167.26 Dependent
@tanstack/solid-start 1.168.36 → 1.168.37 Dependent
@tanstack/solid-start-client 1.168.18 → 1.168.19 Dependent
@tanstack/solid-start-server 1.167.25 → 1.167.26 Dependent
@tanstack/start-client-core 1.170.16 → 1.170.17 Dependent
@tanstack/start-plugin-core 1.171.28 → 1.171.29 Dependent
@tanstack/start-static-server-functions 1.167.21 → 1.167.22 Dependent
@tanstack/start-storage-context 1.167.19 → 1.167.20 Dependent
@tanstack/vue-start 1.168.35 → 1.168.36 Dependent
@tanstack/vue-start-client 1.167.21 → 1.167.22 Dependent
@tanstack/vue-start-server 1.167.25 → 1.167.26 Dependent

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Benchmarks

  • Commit: 798752d8aa1b
  • Measured at: 2026-08-06T07:30:14.367Z
  • Baseline source: history:697ebb6ddbd4
  • Dashboard: bundle-size history

The following scenarios have bundle-size changes compared with the baseline:

Scenario Current (gzip) Delta vs baseline Initial gzip Raw Brotli Trend
vue-router.minimal 52.06 KiB -38 B (-0.07%) 51.93 KiB 142.99 KiB 46.86 KiB ████▂▂▂▂▂▁▁▁
vue-router.full 58.01 KiB -39 B (-0.07%) 57.88 KiB 161.67 KiB 52.06 KiB ████▂▂▂▂▂▁▁▁
vue-start.minimal 68.93 KiB -43 B (-0.06%) 68.80 KiB 194.99 KiB 61.23 KiB ████▆▆▆▁▁▁▁▁
vue-start.full 72.90 KiB -32 B (-0.04%) 72.77 KiB 207.49 KiB 64.76 KiB ████▆▆▆▁▁▁▁▁

Current gzip tracks all emitted client JS chunks. Initial gzip tracks only the entry/import graph. Trend sparkline is historical current gzip ending with this PR measurement; lower is better.

@pkg-pr-new

pkg-pr-new Bot commented Aug 6, 2026

Copy link
Copy Markdown
More templates

@tanstack/arktype-adapter

npm i https://pkg.pr.new/@tanstack/arktype-adapter@7982

@tanstack/eslint-plugin-router

npm i https://pkg.pr.new/@tanstack/eslint-plugin-router@7982

@tanstack/eslint-plugin-start

npm i https://pkg.pr.new/@tanstack/eslint-plugin-start@7982

@tanstack/history

npm i https://pkg.pr.new/@tanstack/history@7982

@tanstack/nitro-v2-vite-plugin

npm i https://pkg.pr.new/@tanstack/nitro-v2-vite-plugin@7982

@tanstack/react-router

npm i https://pkg.pr.new/@tanstack/react-router@7982

@tanstack/react-router-devtools

npm i https://pkg.pr.new/@tanstack/react-router-devtools@7982

@tanstack/react-router-ssr-query

npm i https://pkg.pr.new/@tanstack/react-router-ssr-query@7982

@tanstack/react-start

npm i https://pkg.pr.new/@tanstack/react-start@7982

@tanstack/react-start-client

npm i https://pkg.pr.new/@tanstack/react-start-client@7982

@tanstack/react-start-rsc

npm i https://pkg.pr.new/@tanstack/react-start-rsc@7982

@tanstack/react-start-server

npm i https://pkg.pr.new/@tanstack/react-start-server@7982

@tanstack/router-cli

npm i https://pkg.pr.new/@tanstack/router-cli@7982

@tanstack/router-core

npm i https://pkg.pr.new/@tanstack/router-core@7982

@tanstack/router-devtools

npm i https://pkg.pr.new/@tanstack/router-devtools@7982

@tanstack/router-devtools-core

npm i https://pkg.pr.new/@tanstack/router-devtools-core@7982

@tanstack/router-generator

npm i https://pkg.pr.new/@tanstack/router-generator@7982

@tanstack/router-plugin

npm i https://pkg.pr.new/@tanstack/router-plugin@7982

@tanstack/router-ssr-query-core

npm i https://pkg.pr.new/@tanstack/router-ssr-query-core@7982

@tanstack/router-utils

npm i https://pkg.pr.new/@tanstack/router-utils@7982

@tanstack/router-vite-plugin

npm i https://pkg.pr.new/@tanstack/router-vite-plugin@7982

@tanstack/solid-router

npm i https://pkg.pr.new/@tanstack/solid-router@7982

@tanstack/solid-router-devtools

npm i https://pkg.pr.new/@tanstack/solid-router-devtools@7982

@tanstack/solid-router-ssr-query

npm i https://pkg.pr.new/@tanstack/solid-router-ssr-query@7982

@tanstack/solid-start

npm i https://pkg.pr.new/@tanstack/solid-start@7982

@tanstack/solid-start-client

npm i https://pkg.pr.new/@tanstack/solid-start-client@7982

@tanstack/solid-start-server

npm i https://pkg.pr.new/@tanstack/solid-start-server@7982

@tanstack/start-client-core

npm i https://pkg.pr.new/@tanstack/start-client-core@7982

@tanstack/start-fn-stubs

npm i https://pkg.pr.new/@tanstack/start-fn-stubs@7982

@tanstack/start-plugin-core

npm i https://pkg.pr.new/@tanstack/start-plugin-core@7982

@tanstack/start-server-core

npm i https://pkg.pr.new/@tanstack/start-server-core@7982

@tanstack/start-static-server-functions

npm i https://pkg.pr.new/@tanstack/start-static-server-functions@7982

@tanstack/start-storage-context

npm i https://pkg.pr.new/@tanstack/start-storage-context@7982

@tanstack/valibot-adapter

npm i https://pkg.pr.new/@tanstack/valibot-adapter@7982

@tanstack/virtual-file-routes

npm i https://pkg.pr.new/@tanstack/virtual-file-routes@7982

@tanstack/vue-router

npm i https://pkg.pr.new/@tanstack/vue-router@7982

@tanstack/vue-router-devtools

npm i https://pkg.pr.new/@tanstack/vue-router-devtools@7982

@tanstack/vue-router-ssr-query

npm i https://pkg.pr.new/@tanstack/vue-router-ssr-query@7982

@tanstack/vue-start

npm i https://pkg.pr.new/@tanstack/vue-start@7982

@tanstack/vue-start-client

npm i https://pkg.pr.new/@tanstack/vue-start-client@7982

@tanstack/vue-start-server

npm i https://pkg.pr.new/@tanstack/vue-start-server@7982

@tanstack/zod-adapter

npm i https://pkg.pr.new/@tanstack/zod-adapter@7982

commit: 7a01168

@codspeed-hq

codspeed-hq Bot commented Aug 6, 2026

Copy link
Copy Markdown

Merging this PR will regress 8 benchmarks

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 6 improved benchmarks
❌ 8 regressed benchmarks
✅ 166 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory mem server request-churn (vue) 706.1 KB 3,383.6 KB -79.13%
Memory mem server error-paths unmatched (react) 317.5 KB 626.6 KB -49.33%
Memory mem server error-paths redirect (solid) 388 KB 707.7 KB -45.17%
Memory mem client preload-churn (vue) 737 KB 1,042.5 KB -29.3%
Memory mem client unique-location-churn (vue) 999.3 KB 1,231.2 KB -18.83%
Memory mem server peak-large-page (react) 1.7 MB 1.8 MB -6.17%
Simulation ssr server-fn during document ssr (react) 62.9 ms 66.2 ms -4.96%
Simulation ssr assets linked-css control (vue) 186.1 ms 195.2 ms -4.68%
Memory mem server server-fn-churn (vue) 4,147.3 KB 270.2 KB ×15
Memory mem server error-paths unmatched (vue) 2,142.1 KB 478.9 KB ×4.5
Memory mem server error-paths redirect (vue) 338.6 KB 305.8 KB +10.73%
Memory mem server error-paths not-found (react) 277.7 KB 265.3 KB +4.65%
Memory mem client navigation-churn (solid) 580.3 KB 557.1 KB +4.15%
Memory mem client navigation-churn (vue) 1.3 MB 1.2 MB +3.75%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing codex/compact-vue-private-reactivity (7a01168) with main (697ebb6)

Open in CodSpeed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant