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

Speeding up histogram postprocessing in doHadd #284

Open
wants to merge 1 commit into
base: UL_production
Choose a base branch
from

Conversation

dittmer
Copy link
Contributor

@dittmer dittmer commented Sep 25, 2023

Closing a rootfile with many histograms can take a long time; this can be sped up by using ROOT.gROOT.GetListOfFiles().Remove() (see https://root-forum.cern.ch/t/tfile-close-slow/24179)
This is already done within haddfast, but not when opening / closing the rootfile when doing histogram postprocessing
Since ROOT is not deleting the objects in memory when the file closes, they must be deleted manually instead

Tested and saw minor improvement in closing speed (30s to 6s) for a histogram file with 139k histograms; however analyses with more histograms could see larger improvement. If there are no such analyses, I will close this PR. :)

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.

1 participant