Increase in time consumption of the function GeoHandler::i_collect
after PR #1277
#1291
Closed
1 task done
Labels
Check duplicate issues.
Goal
To resolve a scalability issue caused by
std::find
for highly granular detectorsOperating System and Version
Alma 9
compiler
GCC 11
ROOT Version
6.30/06
DD4hep Version
nightly
Reproducer
I used my own detector for testing, but I bet you can reproduce it by scaling up the
BoxOfStraws
example without SDAdditional context
While moving from the old release to the nightly release, we realized that the overhead time of constructing geometry for a highly granular detector has significantly increased. After doing some tests, we tracked down PR #1277, which seems to be causing the issue. (the nightly build
2024-06-05
is fine, but the2024-06-15
is too slow - and this is the only PR in DD4hep between the two)We ran a
callgrind
profiler and figured out thatGeoHandler::i_collect
has significantly increased timing consumption. I have attached the results for two nightly builds below.0605_result_callgrind.out.3261198.txt
0615_result_callgrind.out.1226121.txt
I assume that
std::find
here is having a scalability issue for high granular detectors becausestd::set::emplace
has O(log(N)) butstd::find
has O(N) time complexity.But, to be honest, I'm not sure how to fix this without ruining #1271 again... so I'd be happy to hear ideas from the developers.
FYI @BrieucF @atolosadelgado @swkim95 @s6anloes
The text was updated successfully, but these errors were encountered: