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
Follow-up to #3437. In that PR, we made adding a new callback group also iterate through the vector of callback groups and remove the ones that are expired.
As mentioned in this comment and other comments below that one, if you have a lot of callback groups (e.g., 2000+), then adding new groups gets slower and slower.
We want to optimize this pruning. Maybe it doesn't need to run every time a callback group is added.
Motivation
Optimize.
Design / Implementation Considerations
We have not come up with a solution yet. Do not open a PR before discussing on this issue and validating a solution with the maintainers.
Whatever solution we pick should align with how we deal with other lists of objects. #3437 already aligns well with that (see comment).
One solution might be to not always iterate through the list, e.g., only when the vector is at capacity, and explicitly doubling its capacity when needed.
Activity