I have a (by now ancient) script to extract trigger rates that has regularly been broken and unbroken by mattak updates, and although it runs again since the recent fixes to skip_incomplete, I noticed that the memory usage has skyrocketed. Changing the backend to uproot limits the memory usage to something reasonable, so it is pyroot-specific. Some quick debugging in Python hasn't led me anywhere yet, and I'm not sure that I would get anywhere trying to debug the root/c++ stuff.
Here's a MWE that demonstrates the memory usage ballooning
import gc
import mattak.Dataset
import time
import logging
logging.basicConfig()
logger = logging.getLogger()
logger.setLevel(logging.INFO)
n_runs = 0
for run in range(0,2000):
try:
d = mattak.Dataset.Dataset(
station=21, run=run,
skip_incomplete=False,
read_daq_status=False, read_run_info=False,
backend='pyroot'
)
d.setEntries((0, d.N()))
einfo = d.eventInfo()
n_runs += 1
except (IOError, ReferenceError, KeyError) as e:
logger.warning('run error', exc_info=e)
continue
I have a (by now ancient) script to extract trigger rates that has regularly been broken and unbroken by mattak updates, and although it runs again since the recent fixes to
skip_incomplete, I noticed that the memory usage has skyrocketed. Changing the backend to uproot limits the memory usage to something reasonable, so it is pyroot-specific. Some quick debugging in Python hasn't led me anywhere yet, and I'm not sure that I would get anywhere trying to debug the root/c++ stuff.Here's a MWE that demonstrates the memory usage ballooning