Conversation
@vitejs/devtools
@vitejs/devtools-kit
@vitejs/devtools-oxc
@vitejs/devtools-rolldown
@vitejs/devtools-vite
@vitejs/devtools-vitest
commit: |
This was referenced Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Switching between large Rolldown traces retains up to 32 readers regardless of trace size. This can keep multiple multi-GiB sessions' parsed data alive after their requests finish.
Add a 256 MiB source-log-size budget alongside the existing reader count limit, evicting the least recently used idle readers. Account for source size even when restoring disk caches, and prune again when reads settle. Readers in the current session directory and pending reads remain available, so oversized or concurrent sessions can exceed the budget; source size is a cache weight, not a heap measurement.
Eviction drops cache ownership without clearing data that RPC handlers may still use. Disposing an evicted reader also checks its identity before removing the cache entry, preserving any replacement for the same path.
Linked Issues
None.
Additional context
Adds 10 regression cases covering LRU eviction, oversized sessions, count limits, retained caller data, replacement disposal, disk-cache restoration, and pending reads across all three read modes. All 10 fail on the previous implementation and pass with this change. Three additional regressions exercise
RolldownLogsManager.loadSession,loadSessionSummary, andloadPackageSessionwith separate metadata files: loading metadata preserves the oversized log reader, repeated requests reuse it, and switching sessions still evicts it. These three cases fail with reader-only protection and pass with session-level protection.Validation:
pnpm lint,pnpm build, andpnpm test --runpassed (355 passed, 2 skipped).pnpm typecheckreports the same eight existing Nuxt/Vite plugin type errors as unmodified59260bfd.This is independent of #592, which bounds bulk reads during plugin detail hydration.