forked from vercel/turborepo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use streaming file reads when comparing for writes (vercel#4093)
### Description Following vercel#3526, this reimplements `write(content)`'s file comparison to stream the contents of the file. Not every file we write is massive, but some of the ones we generate are 100kb+. I hope this can reduce memory pressure a bit by using a consistent 8kb block size, instead of allocating a buffer for the full file contents just to check if we should write. ### Testing Instructions Wait for benchmarks. --------- Co-authored-by: Alex Kirszenberg <[email protected]>
- Loading branch information
1 parent
38adcaf
commit de2284f
Showing
3 changed files
with
108 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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