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

fix: OutOfMemoryError from buildChargeTree.groovy #283

Merged
merged 3 commits into from
Feb 25, 2025
Merged

fix: OutOfMemoryError from buildChargeTree.groovy #283

merged 3 commits into from
Feb 25, 2025

Conversation

c-dilks
Copy link
Member

@c-dilks c-dilks commented Feb 22, 2025

fixes #281

Moves monitor_*.hipo file handling to its own loop, which iterates over QA bins for each run.

HIPO files were not being closed, since monFile and inMdir never go out of scope; each new file and its histograms persists in memory.

Basically, instead of

def obj // global scope
run_list.each {
  obj = new ...
}

do this:

run_list.each {
  def obj = new ... // scoped for only this iteration
}

@jwgibbs
Copy link
Contributor

jwgibbs commented Feb 25, 2025

The edit looks good to me. Good catch.

@c-dilks c-dilks merged commit 31cd862 into main Feb 25, 2025
11 checks passed
@c-dilks c-dilks deleted the fix-leak branch February 25, 2025 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

OutOfMemoryError from buildChargeTree.groovy
2 participants