How Four Lines of Content Quietly Loaded 2MB of Database Engine in the Browser
A developer investigating slow page loads in a customer-facing list discovered the browser was fetching nearly 2MB of data — an 840KB WebAssembly SQLite engine plus a compressed database dump — triggered by Nuxt Content v3's client-side query feature. Since version 3, Nuxt Content embeds content in a SQLite database that can be queried directly in the browser, downloading the full database and a WebAssembly engine each time a client-side navigation occurs. The issue was compounded by a top-level await in the list component, which blocked rendering until the data fully loaded, causing a blank page flash. Adding lazy: true to the component allowed it to render immediately and populate the list once the small data payload arrived, eliminating the visible delay. The case highlights a broader concern about abstraction costs in modern frameworks, where convenient APIs can silently shift significant performance burdens to end users without clear documentation of the trade-offs.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in