ParameterMap: Speed up the way masked detectors are recorded (?) #5606
Labels
Framework
Issues and pull requests related to components in the Framework
Low Priority
Things that you don't ever want to be done.
This issue was originally TRAC 4759
Original Reporter: @jzikovsky
Instead of using a "masked" string with key = detector pointer, I suggest that we record masked detectors in the ParameterMap with a simple map:
Or, even faster would be a vector, which can be accessed in O(1) time instead of O(log(N)) time.
A third option is to hold a std::set
<>
of masked detector IDs. Looking them up will be very fast when few detectors are masked, and at worst O(log(N)) if most detectors are masked. It is also safer than the vector (no going out of bounds).This should speed up instrument view (and others) significantly. Plotting TOPAZ takes 1000 msec + each time it redraws. 800 msec or so are spent looking for masked detectors.
The text was updated successfully, but these errors were encountered: