perf(coverage): speed up v8 report generation (bounded-memory merge + precompiled globs)
Description
Two independent, self-contained performance fixes to coverage report generation (generateCoverage / BaseCoverageProvider), measured on a real 1124-test-file app (~39 MB of raw V8 coverage across the run). Numbers below are best-of-3 runs, baseline vs this PR on the same machine:
| Phase | Before | After |
|---|---|---|
| read + merge | ~20.8s | ~0.30s |
convert (incl. isIncluded filtering) | ~22.2s | ~2.6s |
total generateCoverage | ~43s | ~2.9s |
Peak heap during coverage generation drops from ~2.5 GB ā ~1.15 GB, and resident raw coverage is now bounded to ā¤16 MB regardless of suite size.
isIncluded runs per covered file inside convertCoverage, so the glob fix's savings land in the convert row above; the pure astV8ToIstanbul transform (~2.6s) is itself unchanged.
Tests
No behavior change. Both fixes are verified against the existing test/coverage-test suites (v8 + istanbul), which assert coverage output and the set of included files. pnpm typecheck and pnpm lint pass. A backport to the v4 release line will follow.
š¤ Generated with Claude Code