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

Reduce pressure on GC by using a Traversable instead of a Seq #96

Merged
merged 3 commits into from
Nov 1, 2023

Conversation

romainreuillon
Copy link
Contributor

Listing file using contentOf primitive return a Sequence. In large projects building many concurrent bundles in parallels this put a lot of pressure on the GC. This patch uses a Traversable instead of a Seq to reduce this pressure.

romainreuillon added a commit to openmole/openmole that referenced this pull request Oct 24, 2023
def content =
sbt.Path.contentOf(tmpArtifactDirectoryPath).filterNot { case (_, p) => p == "META-INF/MANIFEST.MF" }
def content = {
import _root_.java.nio.file.*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use ._ instead of .* here so its consistent with the rest of the project?

Otherwise lgtm

@romainreuillon
Copy link
Contributor Author

@mdedetrich I just changed * for _ in the import statements

Copy link
Collaborator

@mdedetrich mdedetrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. I will wait till EOD incase you want to add more commits

@mdedetrich mdedetrich merged commit 2a32f3c into sbt:main Nov 1, 2023
2 checks passed
@mdedetrich
Copy link
Collaborator

@romainreuillon I just released sbt-osgi 0.9.9 which has this improvement. Should be available in maven in an hour.

@romainreuillon
Copy link
Contributor Author

👍

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.

2 participants