Skip to content

TrigByteStreamTools: Optimise the dumpHLTContentInBS_run3 script

Rafal Bielski requested to merge rbielski/athena:opt-hltresult-python into master

Processing ByteStream data in python is full of performance traps. Juggling python and C++ types together to decode HLT EDM collection names from a BS file makes it even worse. Optimise the dumpHLTContentInBS_run3 script by reducing the number of the most costly operations, mainly python iterations over raw data in C++ format. This is done by reworking loops and functions, and using lru_cache to avoid decoding the same words multiple times.

Cuts down the time it takes to process 1000 events by a factor of 2 from 400 to 200 seconds. Tested with:

time prmon -i 3 -- trigbs_dumpHLTContentInBS_run3.py --sizeSummary data18_13TeV.00360026.unknown_SingleStream.daq.RAW._lb0151._Athena._0001.data

where the BS file is produced by test_trig_data_v1Dev_writeBS_grid.py.

Extra change (separate commit): increase the timeout for the corresponding ART test steps to 10 minutes.

Fixes ATR-22083

Please don't squash the commits

Merge request reports