Skip to content

perf(vue-router): share blocker subscription logic - #7979

Draft
Sheraff wants to merge 6 commits into
mainfrom
codex/vue-blocker-isolated
Draft

perf(vue-router): share blocker subscription logic#7979
Sheraff wants to merge 6 commits into
mainfrom
codex/vue-blocker-isolated

Conversation

@Sheraff

@Sheraff Sheraff commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • share the private blocker location conversion and resolver state machine used by useBlocker and Block
  • preserve fixed hook options, reactive component options, callback receivers, cleanup ordering, defaults, and public APIs
  • add focused lifecycle, receiver, reactivity, and cleanup coverage

Bundle impact

Fresh paired 17-scenario matrix against 697ebb6:

  • vue-router.full: -765 B raw, -148 B gzip, -29 B Brotli
  • vue-start.full: -765 B raw, -163 B gzip, -47 B Brotli
  • all other 15 scenarios: byte-identical

The minimal Vue scenario remains unchanged, confirming that the shared private implementation does not leak across the tree-shaking boundary.

Validation

  • focused blocker suite: 14 passed
  • full Vue Router unit suite: 818 passed, 1 skipped
  • Vue Router type suite: 138 passed
  • Vue Router ESLint: 0 errors
  • full 17-scenario bundle matrix: passed
  • emitted-code AB/BA runtime benchmark: no reproducible regression
  • six independent semantic, API, runtime, test, attribution, and scope reviews: approved

@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: 5f29036d-1f7a-40c1-b710-b223f871549f

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 72967a3

Command Status Duration Result
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 2m 11s View ↗

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

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

🚀 Changeset Version Preview

No changeset entries found. Merging this PR will not cause a version bump for any packages.

@github-actions

github-actions Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Benchmarks

  • Commit: bbe880877247
  • Measured at: 2026-08-06T14:59:04.017Z
  • Baseline source: history:abf9b81b1f14
  • 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.full 57.58 KiB -162 B (-0.27%) 57.45 KiB 159.42 KiB 51.77 KiB █▄▄▄▄▄▃▃▂▂▂▁
vue-start.full 72.46 KiB -155 B (-0.21%) 72.33 KiB 205.20 KiB 64.38 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@7979

@tanstack/eslint-plugin-router

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

@tanstack/eslint-plugin-start

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

@tanstack/history

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

@tanstack/nitro-v2-vite-plugin

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

@tanstack/react-router

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

@tanstack/react-router-devtools

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

@tanstack/react-router-ssr-query

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

@tanstack/react-start

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

@tanstack/react-start-client

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

@tanstack/react-start-rsc

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

@tanstack/react-start-server

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

@tanstack/router-cli

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

@tanstack/router-core

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

@tanstack/router-devtools

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

@tanstack/router-devtools-core

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

@tanstack/router-generator

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

@tanstack/router-plugin

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

@tanstack/router-ssr-query-core

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

@tanstack/router-utils

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

@tanstack/router-vite-plugin

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

@tanstack/solid-router

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

@tanstack/solid-router-devtools

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

@tanstack/solid-router-ssr-query

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

@tanstack/solid-start

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

@tanstack/solid-start-client

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

@tanstack/solid-start-server

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

@tanstack/start-client-core

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

@tanstack/start-fn-stubs

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

@tanstack/start-plugin-core

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

@tanstack/start-server-core

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

@tanstack/start-static-server-functions

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

@tanstack/start-storage-context

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

@tanstack/valibot-adapter

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

@tanstack/virtual-file-routes

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

@tanstack/vue-router

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

@tanstack/vue-router-devtools

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

@tanstack/vue-router-ssr-query

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

@tanstack/vue-start

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

@tanstack/vue-start-client

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

@tanstack/vue-start-server

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

@tanstack/zod-adapter

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

commit: 72967a3

@codspeed-hq

codspeed-hq Bot commented Aug 6, 2026

Copy link
Copy Markdown

Merging this PR will degrade performance by 5.82%

⚠️ 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

⚡ 4 improved benchmarks
❌ 6 regressed benchmarks
✅ 164 untouched benchmarks
⏩ 6 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Memory mem server error-paths redirect (vue) 358.2 KB 740.3 KB -51.62%
Memory mem server error-paths redirect (solid) 273.1 KB 448.4 KB -39.1%
Memory mem server error-paths unmatched (react) 263.2 KB 282.7 KB -6.89%
Memory mem server peak-large-page (solid) 788.1 KB 821.5 KB -4.06%
Memory mem server server-fn-churn (react) 265 KB 275.6 KB -3.84%
Simulation ssr request loop (solid) 157.7 ms 163.4 ms -3.49%
Memory mem server request-churn (react) 940 KB 503.9 KB +86.54%
Memory mem client unique-location-churn (react) 762.5 KB 686.4 KB +11.09%
Memory mem server server-fn-churn (vue) 274.7 KB 263.1 KB +4.4%
Memory mem server server-fn-churn (solid) 274.9 KB 264.6 KB +3.91%

Tip

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


Comparing codex/vue-blocker-isolated (72967a3) with main (abf9b81)

Open in CodSpeed

Footnotes

  1. 6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

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