Long time to close ROOT file with O(500k) histograms

,

Hello,

I am trying to write an output ROOT file using the attached macro that contains O(500k) histograms. I see that TFile.Close() function takes a very long time even after the file is written. You can reproduce this with this command:

$ python processHitInfo.py data18_v6.root --save-hists

where the input file is available here:

https://rustem.web.cern.ch/debug/data18_v6.root

Please let me know if you cannot reproduce this or have any questions. Thanks for taking a look.

Cheers,
Rustem

processHitInfo.py (13.1 KB)


Please read tips for efficient and successful posting and posting code

ROOT Version: v6.20.06
Platform: lxplus
Compiler: Not Provided


@pcanal can you please take a look?Thanks!

@rustem I think it could be a valid ROOT bug, can you please open a bug report at Issues · root-project/root · GitHub
Thanks!

To speed up the process and if you are sure that there is no reference to the histogram that need to be indirectly cleaned-up (eg. if you close any Canvases prior to the file closing), you can do:

ROOT.gROOT.GetListOfFiles().Remove(myfile)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.