You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue lists possible improvements in framework's thinning feature that were mentioned in the review of #31100 (in no particular order)
Make ThinnedRefSet to not call thinnedRefFrom() on every insertion. On the other hand profiling in Extend thinning to support slimming #31100 (comment) indicates that the repeated calls would not be a real issue. Can be revisited if the cost becomes non-negligible. Possible improvements include
Add a variant if thinnedRefFrom() taking a sequence of Refs
Craft a helper class that holds the thinning parentage information from the parent to `thinned
Change ThinnedRefSet::keys_ from std::unordered_map to something faster or lighter, e.g. std::vector<bool> (faster) or std::vector<unsigned int> (lighter, possibly faster). Needs specific performance stiudy.
Make the lookup from thinned to parent use O(log(n)) search (n=number of all thinned collections) instead of O(n). The cost of O(n) would have to be demonstrated to be non-negligible first.
Look into changing the Selector API such that an object returned by preChoose() (if any) would be given as an argument to choose(). This would make the use of ThinnedRefSet little bit easier, explicit Selector::reset() would not be needed, and allow global::ThinningProducer.
Add EDProductGetter::getThinnedProductRange() to return a thinned collection (if any) that contains all the elements of a given (begin, end) range of keys to parent collection. Would need some nice user-facing API as well (e.g. edm::RefSpan to model std::span?)
This issue lists possible improvements in framework's thinning feature that were mentioned in the review of #31100 (in no particular order)
ThinnedRefSet
to not callthinnedRefFrom()
on every insertion. On the other hand profiling in Extend thinning to support slimming #31100 (comment) indicates that the repeated calls would not be a real issue. Can be revisited if the cost becomes non-negligible. Possible improvements includethinnedRefFrom()
taking a sequence of Refsparent
to `thinnedThinnedRefSet::keys_
fromstd::unordered_map
to something faster or lighter, e.g.std::vector<bool>
(faster) orstd::vector<unsigned int>
(lighter, possibly faster). Needs specific performance stiudy.thinned
toparent
use O(log(n)) search (n=number of all thinned collections) instead of O(n). The cost of O(n) would have to be demonstrated to be non-negligible first.Selector
API such that an object returned bypreChoose()
(if any) would be given as an argument tochoose()
. This would make the use ofThinnedRefSet
little bit easier, explicitSelector::reset()
would not be needed, and allowglobal::ThinningProducer
.EDProductGetter::getThinnedProductRange()
to return a thinned collection (if any) that contains all the elements of a given(begin, end)
range of keys to parent collection. Would need some nice user-facing API as well (e.g.edm::RefSpan
to modelstd::span
?)ThinningTestAnalyzer::analyze()
into multiple functions to make it more clear. Done in Refactor ThinningTestAnalyzer::analyze() #31365.The text was updated successfully, but these errors were encountered: