Repeated navigation in an Inertia/Vue application causes the Vue Devtools Chrome extension (7.7.7) to become progressively slower.
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- devtools
Research direction
Start by locating initDevToolsServerListener() and tracing how it registers handlers on devtools.ctx.hooks through the birpc interface. Check how the broadcast instance behaves during teardown and reconnection before deciding whether an initialization guard is safe. Done means repeated initialization no longer adds duplicate handlers or causes redundant messages, while reconnection behavior remains correct.
Written by the indexing model from the issue text.
Description
fix: prevent duplicate DevTools server listener registration
##created with help of AI
Problem
Repeated navigation in an Inertia/Vue application causes the Vue Devtools Chrome extension (7.7.7) to become progressively slower.
Investigation revealed that initDevToolsServerListener() can be invoked repeatedly through the birpc interface. Each invocation registers additional handlers on devtools.ctx.hooks, without checking whether those handlers have already been registered.
After several navigations, the internal hook registry contained 45 distinct handlers for each of the following events:
routerInfoUpdatedsendInspectorTreeToClientsendInspectorStateToClient
This caused thousands of redundant inspector and router messages, despite relatively few Vue component lifecycle events.
Fix
Make initDevToolsServerListener() idempotent using a module-scoped initialization guard.
Subsequent RPC calls no longer register duplicate listeners.
Verification
- Reproduced with Vue 3.5.42 and Inertia 2.1.6.
- Reproduced using a minimal Vue application without Pinia or Vue Router.
- Confirmed repeated
initDevToolsServerListener()RPC invocations using Chrome's debugger. - Confirmed accumulation of 45 distinct callbacks per internal messaging hook.
- Verified that deduplicating listeners and preventing further registration resolves the performance degradation.
Considerations
The guard assumes that the underlying RPC broadcast instance remains valid across subsequent initialization requests.
Connection teardown and reconnection behavior should be verified before merging.
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 292
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 29
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vuejs/devtools
-
[vite-plugin-vue-devtools] Component Inspector click triggers the inspected element's default action/handlersPossibly taken @ValentinYoushkevich claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
Maintainers usually reply within 3 days
-
Upgrade Electron to fix ZIP extraction on Node.js 26Possibly taken @ondrhn claimed this 64 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 3 days
-
On the landing site, the "Developer experience" card is redundantMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Maintainers usually reply within 3 days
-
`https://devtools.vuejs.org/guide/faq.html` was 404Possibly taken @ValentinYoushkevich claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
vuejs/devtools#975 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
Maintainers usually reply within 3 days
Similar issues
-
bug priority: low role: BE stage: now
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
ahmadrosid/nakama#2594 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
milind-soni/OpenMausBot#6495 ·
Maintainers usually reply within 1 day
-
Navigating the session tree adds the branch's prompts to Up-arrow history againPossibly taken @acmerfight claimed this today. Openuntriaged
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
earendil-works/pi#12279 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
approved documentation
Difficulty 1/5 Under an hour Newbie friendliness 89/100
vitest-dev/vitest#12015 · 4 comments ·
Maintainers usually reply within 1 day