Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert allow multiple states during transfer edge traversals #6357

Draft
wants to merge 2 commits into
base: dev-2.x
Choose a base branch
from

Conversation

vpaturet
Copy link
Contributor

@vpaturet vpaturet commented Jan 3, 2025

Summary

This PR reverts #6238 which seems to cause performance issues in our production environment.
This PR is not intended to be merged, but only to be used for further investigating the issue.

Issue

No

Unit tests

No

Documentation

No

@vpaturet vpaturet self-assigned this Jan 3, 2025
@vpaturet vpaturet added Bug Entur Test This is currently being tested at Entur labels Jan 3, 2025
Copy link

codecov bot commented Jan 3, 2025

Codecov Report

Attention: Patch coverage is 72.41379% with 8 lines in your changes missing coverage. Please review.

Project coverage is 69.84%. Comparing base (e1b3064) to head (868a8db).

Files with missing lines Patch % Lines
...tripplanner/street/search/state/EdgeTraverser.java 40.00% 4 Missing and 2 partials ⚠️
...algorithm/mapping/RaptorPathToItineraryMapper.java 85.71% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             dev-2.x    #6357      +/-   ##
=============================================
- Coverage      69.85%   69.84%   -0.02%     
+ Complexity     17927    17919       -8     
=============================================
  Files           2035     2035              
  Lines          76509    76506       -3     
  Branches        7825     7823       -2     
=============================================
- Hits           53446    53434      -12     
- Misses         20324    20330       +6     
- Partials        2739     2742       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@miklcct
Copy link
Contributor

miklcct commented Jan 3, 2025

I will also try this out in our test environment. It currently takes about 2 minutes for walk and 5 minutes for bike for a response with a new configuration on our test environment with about 6M walk and 15M bike transfers.

In particular, I will check if both walk and bike route planning still works correctly.

@miklcct
Copy link
Contributor

miklcct commented Jan 4, 2025

I have deployed this change in Aubin (GB wide data) test server. The response time of a new preference has been improved to about half a minute for walk, and 75 seconds for bike, whereas before it was about 2 minutes for walk and 5 minutes for bike.

@leonardehrenfried
Copy link
Member

I can confirm that this PR makes start up and transfer cache computation a lot faster.

In order to have some hard numbers I also added some data to the speed test: #6362

Comment on lines +370 to +376
var states = e.traverse(s);
if (State.isEmpty(states)) {
s = null;
} else {
transferStates.add(states[0]);
s = states[0];
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can revert this for the performance benefit. It may be useful to add a check here to avoid problems related to A* searches returning multiple states similar to EdgeTraverser.

@vpaturet
Copy link
Contributor Author

vpaturet commented Jan 7, 2025

For reference, flame graph showing the impact of #6238 on RaptorRequestTransferCache

Screenshot from 2025-01-07 11-02-57

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Entur Test This is currently being tested at Entur
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants