Repository navigation
Conversation
Once V8 has accepted a cache read from disk, the compile cache keeps the buffer until the process exits, only to pass it to V8 again if the same code is compiled a second time in the process. Release it once V8 has consumed it, and read the file again in that case, so a process no longer holds the caches of all the modules it loaded in memory. Caches produced by the process itself are kept until they are written.
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.
second upstream candidate, independent of the other one (also one commit on main 67e45e4)
once v8 accepts a cache read from disk node keeps the buffer until exit, only so it can hand it to v8 again if the same file gets compiled twice in one process. this frees it once v8 consumed it and just reads the file again in that case. caches the process made itself are kept until theyre written, the sea build needs that
warm cache, 30 paired runs vs main, timings unchanged:
• loading webpack + babel + prettier + eslint + typescript (431 cached files, 5.2 MB): max rss 137.4 → 135.4 MiB (−1.7%)
• eslint on a small project 111.9 → 109.6 MiB (−2.1%)
•
tsc -pno change, its one 1.4 MB buffer doesnt show up in max rsssmall win on its own, mostly worth it next to the after-execution change where it takes eslint's rss bump from +3.7% to +1.3%:
node's first-contribution guide says not to open a second PR before the first one is approved, so this one waits