THistSvc performs unnecessary type lookups
I'm in the process of analyzing the output from a 64-threaded ATLAS reconstruction job. Which is unfortunately not performing all that well... (You can find some information about other bottlenecks that I found in the ATLAS code in ATLASRECTS-6316 and ATLASRECTS-6317.)
With this many threads I found a quite unexpected bottleneck in the execution as well. This one:
Because of the profiled code is optimized, the line numbers are not super reliable unfortunately. But the problem should be this line:
https://gitlab.cern.ch/gaudi/Gaudi/-/blob/master/GaudiSvc/src/THistSvc/THistSvc.cpp#L1489
The good thing is, I think we can help it relatively easily. We should switch to using TClass::InheritsFrom(const TClass*) in that line. With the TClass
for TTree
being grabbed during the initialization of the service.
Of course one can very much argue that THistSvc::updateFiles()
is a completely useless function to begin with, but I think this technical update would be easier to do at first...