All quizzesHard
Bundle Optimization
Preview — 3 of 10 questions
What are the two main strategies for virtual scrolling and what are their tradeoffs?
ADOM recycling vs. element caching — DOM recycling is always faster
BCSS-based virtualization vs. JavaScript-based virtualization — CSS is always preferred
CFixed-size virtualization (known item height) vs. variable-size virtualization (measured at runtime) — fixed is simpler and faster; variable requires measurement
DColumn virtualization vs. row virtualization — use column for wide tables, row for long lists
How do you preload async components before the user navigates to them?
AUse <link rel="prefetch"> for route-level chunks or call import() on user interaction signals (hover, focus)
BSet preload: true in defineAsyncComponent options
CVue automatically preloads all async components on initial page load
DUse router.prefetch() — a built-in Vue Router method for preloading route components
What is the optimal chunk splitting strategy for a large Vue application?
ANever split — one large bundle is faster because it requires only one HTTP request
BOnly split when the bundle exceeds 5MB — smaller bundles don't need splitting
CSplit every component into its own chunk for maximum granularity
DSplit vendor libs from app code; split rarely-visited routes into separate chunks; keep frequently visited routes in the main bundle
Sign up free to play
Answer all 10 questions (7 more), see explanations for every answer, and track your score.