Frontory

Open code, practice, and notes →

Download source with English comments · for reading

Vue · 25 Observing Vue Performance

Series contents · Technology map

Stage: Canvas Integration and Update Verification · Editable example · Storage ID: vue-step-25

Goals and learning outcomes

Prerequisites

Unit 25 builds on the work and experiment records from Unit 24.

Key concepts and explanations

Update scope

Prop stability and computed dependencies affect update scope. Identify which components change before optimizing.

Measurement conditions

Developer tool logs themselves add execution cost. Compare under the same data, input, and build conditions, and record measurement limitations.

Practice setup

First check the execution scope guidance on the example screen. The following is the preparation environment for extending the assignment in a separate project. Use .vue SFCs and script setup in a separate Vue Vite project. Record package versions and the lockfile, and run on the development server. The built-in Vue examples use the h function and are not a general-purpose SFC compiler.

The linked example is a starting point. It does not implement every task below. Complete work beyond its supported scope in a separate project.

Practice tasks

  1. Supply 1000 cards to src/CardList.vue and instrument update counts.
  2. Create a comparison passing a per-row selected boolean instead of the full selected id.
  3. Record update counts and times for 10 selections in notes/performance.md.

Variables to observe

VariableBaselineChangeExpected change / hypothesis
propsselectedId passed to all rowsPer-row selectedUpdate scope may shrink to the rows whose selection changed.

Predictions in this table are not measured results. Change one condition at a time and record why the actual result differs.

Completion criteria

Self-check

  1. Are fewer reactive dependencies always faster?
  2. Why record whether measurements use development mode?

Official references

Linked example and execution scope

Example source · Runtime environments and limits

This is an experiment with actual Vue reactivity and render functions. Check SFC templates in an external compilation environment.

Source code and records are not overwritten automatically. Resetting an existing example also preserves your notes.

Next learning

Previous: Shallow Reactivity and External Objects · Next: Checking Behavior Regressions and Save Races

Open code, practice, and notes →