Description
Check duplicate issues.
- Checked for duplicates
Describe the bug
When doing a simple TFile::Open()
, ROOT initialises the interpreter on the first TEnv::GetValue
needed by the aforementioned method. This makes it load all the pcms which it can find, regardless of weather they are needed to read the file or not (in our case we only have branches with basic types, e.g. floats or ints or vector of thereof).
This has the net result of adding 70MB of RSS for no particular reason to any process which uses ROOT. You can find more details in the attached instruments screenshot.
Moreover, single stepping with the debugger and printing out the LoadModule argument, it seems that the pcms for Sofie, Proof and 3D graphics are particularly honours, all of which we do not need and we do not link.
What is the expected behaviour?
The best would be for ROOT to be smart enough to lazily load the pcms when they are actually needed, not upfront. A second best option would be to be able to start the interpreter in a clean slate state and load by hand only the pcms which are needed to read a file.
How to reproduce?
On macOS using Instruments one can do:
xcrun xctrace record --output root.trace --time-limit 30s --template Allocations --launch -- /Users/ktf/src/sw/osx_arm64/ROOT/alice-v6-28-04-local2/bin/root.exe -q -b http://alimonitor.cern.ch/train-workdir/testdata/LFN/alice/data/2015/LHC15o/000246392/pass2/PWGZZ/Run3_Conversion/320_20220701-0813/AOD/019/AO2D.root
open root.trace
and get the report in question. Using the alice environment should not matter, but in principle you should be able to load it from CVMFS.
ROOT version
6.28.04, but it's a while we see it.
How did you install ROOT?
ALICE build environment
Which operating system are you using?
macOS, linux
Additional context
No response
Metadata
Metadata
Assignees
Type
Projects
Status