浏览器与自动化
vue-performance
Diagnose and fix Vue 3 performance problems. Profiling with Vue DevTools and the browser, render tracking, shallowRef, v-memo, list virtualization, Vapor Mode, bundle size with code splitting and Rolldown analysis, and memory leaks. Use when a Vue app is slow, janky, too large or leaking memory, or when reviewing code for performance.
KIMJINWOO4 · 已有静态检查记录
安装与使用
运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。
npx skills add KIMJINWOO4/vue-skills --skill vue-performance技能说明
name: vue-performance description: Diagnose and fix Vue 3 performance problems. Profiling with Vue DevTools and the browser, render tracking, shallowRef, v-memo, list virtualization, Vapor Mode, bundle size with code splitting and Rolldown analysis, and memory leaks. Use when a Vue app is slow, janky, too large or leaking memory, or when reviewing code for performance.
Vue Performance
Versions checked on 2026-10-15: Vue 3.5 (3.6 RC with Vapor Mode), Vite 8.3 with Rolldown.
Measure before changing anything. Read diagnose first, then go to the reference that matches the symptom.
Triage
| Symptom | Area | Reference |
|---|---|---|
| Slow first load, large JavaScript download | Bundle | bundle |
| Slow interactions, typing lag, janky lists | Rendering | rendering |
| Tab gets slower over time or crashes after long use | Memory | memory-leaks |
| "It feels slow", no numbers yet | Measurement | diagnose |
Quick wins to check first
shallowReffor large objects and arrays that are replaced rather than mutated, such as API responses.- Stable
:keyvalues inv-for, andcomputedfor filtered lists instead of method calls in the template. - Virtualize lists longer than about 200 rows (
useVirtualList,vue-virtual-scroller). - Split code by route; file-based routing does it for free.
- Load heavy below-the-fold widgets with
defineAsyncComponent, and use lazy hydration in Nuxt. - Keep props stable in hot lists: no new objects, arrays or closures created inline per render.
- Watch a getter on the field you need instead of
deep: trueon a large tree. - On Vue 3.6, move components the profiler flags as hot to Vapor Mode (vue-36-vapor).
Tools
- Vue DevTools: component render timings, timeline, Pinia state.
- Browser Performance panel for long tasks and layout work; Memory panel heap snapshots for leaks.
- Vite DevTools (experimental in Vite 8.3,
devtools: truewith@vitejs/devtools) for module graph and Rolldown bundle analysis.
Do not
- Add
v-memoeverywhere. It is for a proven hotv-forand has its own comparison cost. - Switch working code to
markRaworshallowReactiveon a guess; both remove guarantees other code relies on. - Call something an optimization without a before and after number.