Use TripPatterns for filtering - #4820
Conversation
As routes can contain multiple modes
Basically free, compared to an iterator-based iteration
Codecov ReportBase: 62.14% // Head: 62.12% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #4820 +/- ##
=============================================
- Coverage 62.14% 62.12% -0.02%
- Complexity 13000 13005 +5
=============================================
Files 1650 1650
Lines 66064 66105 +41
Branches 7184 7198 +14
=============================================
+ Hits 41055 41070 +15
- Misses 22669 22688 +19
- Partials 2340 2347 +7
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
|
I'm currently testing another fix for the Windows problem: 004eeb4 |
t2gran
left a comment
There was a problem hiding this comment.
Looked fast through this and it looks ok.
| // then we do not have to do that at all and it should increase performance a lot | ||
| // trip has to match with at least one predicate in order to be included in search | ||
| // Trip has to match with at least one predicate in order to be included in search. We only have | ||
| // to this if we have mode specific filters, and not all trips on hte pattern have the same |
|
|
||
| public List<SelectRequest> not() { | ||
| return not; | ||
| return Collections.unmodifiableList(Arrays.asList(select)); |
There was a problem hiding this comment.
I think this should be not
There was a problem hiding this comment.
No, we no longer expose not, as it did have no usage.
|
To unblock @Bartosz-Kruba I'm going to merge this. |
Summary
There is a couple of issues with the current filtering code:
matchTripTimesdid not use thenotfilter.This fixes these issues, by doing the filtering on the pattern level instead, and adding a boolean flag on the pattern, containing information whether the pattern contains multiple modes or submodes.
Also some minor performance optimizations were done.