New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if cache pack is too big, we should batch writing #15373
Conversation
For maintainers only:
|
e7580d8
to
20596e7
Compare
if cache pack is too big, we should write in stream using callback
20596e7
to
339af7e
Compare
* chunks of 511MiB and * total of 2GiB
for (const b of content) stream.write(b); | ||
stream.end(); | ||
// split into chunks for WRITE_LIMIT_CHUNK size | ||
const chunks = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (size < WRITE_LIMIT_CHUNK) {
for (const b of content) stream.write(b);
return stream.end();
}
I think we still can use this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, but that doesn't really makes a difference...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for small builds we will skip chunking..
f457c8d
to
7badefd
Compare
What kind of change does this PR introduce?
fixes #14907
Did you add tests for your changes?
there are existing tests in #15367
Does this PR introduce a breaking change?
no
What needs to be documented once your changes are merged?
nothing