Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
6674: Optimize finding of first start time and first & last end times #31
This optimization relies on the fact that event lanes are sorted by timestamp. This allows us to skip performing very costly comparisons when finding the first start time or first/last end times of an IItemCollection and instead just get the first or last events in each lane and find the event in that set that was earliest or last, respectively.
This PR also removes the associated aggregators to strongly encourage downstream users to make use of the added RulesToolkit methods.
JMC-6674: Inefficient finding of first start time and first & last end times
JMC parser currently guarantees that IItemCollection events are retrieved in sorted, disjoint, lanes. Each event is iterated over in the time that it was emitted, and if there is an overlap then it will be in another lane. This is why we iterate through the IItemCollection and then through the IItemIterable, even if the IItemCollection is filtered to only contain one type.
There is still the problem that this relies on the implicit assumption that these lanes are sorted in this fashion, but since we're currently performing a computationally intensive sorting during the parsing we should think about exploiting that fact.
@Gunde This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type
Since the source branch of this PR was last updated there have been 9 commits pushed to the
@Gunde The following commits have been pushed to master since your change was applied:
Your commit was automatically rebased without conflicts.
Pushed as commit 6dd19dd.
6674: Optimize finding of first start time and first & last end times