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

Do not grow line buffer in slurp unbounded #1123

Merged
merged 1 commit into from Dec 1, 2019
Merged

Conversation

@fthomas
Copy link
Owner

fthomas commented Dec 1, 2019

If a program created by process.slurp outputs a lot of lines, the
internal line buffer can grow until there is no more available heap
space and an OOME occurs. I've observed this with a Scalafix migration
that printed a lot of stack traces.

To prevent OOMEs we put an upper bound on the number of lines we're
storing by using the new appendBounded.

If a program created by `process.slurp` outputs a lot of lines, the
internal line buffer can grow until there is no more available heap
space and an OOME occurs. I've observed this with a Scalafix migration
that printed a lot of stack traces.

To prevent OOMEs we put an upper bound on the number of lines we're
storing by using the new `appendBounded`.
@fthomas fthomas added the bug label Dec 1, 2019
@fthomas fthomas added this to the 0.5.0 milestone Dec 1, 2019
@codecov

This comment has been minimized.

Copy link

codecov bot commented Dec 1, 2019

Codecov Report

Merging #1123 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1123      +/-   ##
==========================================
+ Coverage   66.08%   66.13%   +0.04%     
==========================================
  Files          95       95              
  Lines        1489     1491       +2     
  Branches       36       42       +6     
==========================================
+ Hits          984      986       +2     
  Misses        505      505
Impacted Files Coverage Δ
.../main/scala/org/scalasteward/core/io/process.scala 100% <100%> (ø) ⬆️
...ain/scala/org/scalasteward/core/util/package.scala 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 636029c...4dc4e08. Read the comment docs.

@fthomas fthomas merged commit 7afc0d2 into master Dec 1, 2019
6 checks passed
6 checks passed
Codacy/PR Quality Review Up to standards. A positive pull request.
Details
Summary no rules match, no planned actions
Details
Travis CI - Branch Build Passed
Details
Travis CI - Pull Request Build Passed
Details
codecov/patch 100% of diff hit (target 66.08%)
Details
codecov/project 66.13% (+0.04%) compared to 636029c
Details
@fthomas fthomas deleted the topic/appendBounded branch Dec 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.