new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Vue · Guide · all subjects

performance/components

3 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Component abstraction overhead

Component instances are much more expensive than plain DOM nodes. Creating too many component instances due to abstraction patterns (such as renderless components or higher-order components) will incur performance costs. This is especially problematic in large lists where removing one unnecessary component abstraction could result in a reduction of hundreds of component instances.

When to optimize component abstractions

Reducing only a few component instances won't have noticeable performance effect. The best scenario to consider component abstraction optimization is in large lists. For example, a list of 100 items where each item component contains many child components is a good candidate for this optimization.

v-if vs v-show performance considerations

v-if has higher toggle costs but is lazy, not rendering the conditional block until the condition becomes true for the first time. v-show has higher initial render costs but simpler toggling via CSS. Prefer v-show if you need to toggle something very often; prefer v-if if the condition is unlikely to change at runtime.

Give your agent this brain