Skip to content
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

Bound stdout shifting to prevent excessive allocations #941

Merged
merged 2 commits into from Mar 10, 2021

Conversation

jridgewell
Copy link
Contributor

I noticed this when using an incremental rebuild. In my project, the stdout can grow to 100mb+ during the initial build. During rebuild, the stdout is mostly empty. But the old code used an unbounded slice, which allocated and shifted almost the full 100mb.

I noticed this when using an incremental rebuild. In my project, the `stdout` can grow to 100mb+ during the initial build. During rebuild, the `stdout` is mostly empty. But the old code used an unbounded `slice`, which allocated almost the full 100mb.
@maysupan
Copy link

Thank you.

@evanw
Copy link
Owner

evanw commented Mar 10, 2021

Good catch! I had intended to use subarray here instead of slice. Thanks for fixing this.

@evanw evanw merged commit d8f281e into evanw:master Mar 10, 2021
@jridgewell jridgewell deleted the stdout-slice branch March 10, 2021 09:22
evanw added a commit that referenced this pull request Mar 11, 2021
This was referenced Mar 14, 2021
This was referenced Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants