The Wire · Showcase
VITEPRESS TACKLES MEMORY BLOAT ON MASSIVE SITES
By RepoJournal · Filed · About Vue.js
VitePress shipped three performance fixes targeting the markdown pipeline, capping unbounded caches that were crushing memory usage on large documentation sites.
The core issue: gray-matter was memoizing every parsed result in an unbounded cache, and VitePress's own compile cache had no size limit [1]. Miroma and IMB11 have now bounded the markdown compile cache to 64MB with a sha256-keyed lookup instead of JSON.stringify, and patched the gray-matter leak by passing empty options on every call to bypass its internal memoization [2]. A fourth commit refactors logVersion to stop injecting onAfterConfigResolve solely for printing the version banner, now logging after config resolve in build() itself [3]. The changes are part of a larger performance push for sites like Fabric Docs, with even bigger worker-batching improvements still in flight [4]. Meanwhile, test-utils rolled oxfmt to 0.61.0 and bumped jsdom to v30.0.0, keeping the test harness current [5] [6]. Across all three repos, 4 commits and 3 PRs landed in the last 24 hours.
One email a day. Unsubscribe in one click.
Keep up with Vue.js in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
Action items
- → Review the refactor(logVersion) breaking change in VitePress before upgrading vuejs/vitepress [plan]
- → Test jsdom v30 upgrade in your test suite vuejs/test-utils [plan]
- → Monitor VitePress memory usage on large sites after the cache fixes vuejs/vitepress [monitor]
References
- [1] perf(md): bypass gray-matter's unbounded cache vuejs/vitepress
- [2] perf(md): limit the compile cache's memory usage vuejs/vitepress
- [3] refactor(logVersion)!: avoid onAfterConfigResolve vuejs/vitepress
- [4] perf(md): various performance improvements ↗ vuejs/vitepress
- [5] chore(deps): update dependency oxfmt to v0.61.0 ↗ vuejs/test-utils
- [6] chore(deps): update dependency jsdom to v30 ↗ vuejs/test-utils