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

Junction restriction manager is not using the cache it has #902

Open
kianzarrin opened this issue May 22, 2020 · 3 comments · May be fixed by #1579
Open

Junction restriction manager is not using the cache it has #902

kianzarrin opened this issue May 22, 2020 · 3 comments · May be fixed by #1579
Assignees
Labels
feature A new distinct feature JUNCTION RESTRICTIONS Feature: Junction restrictions PATHFINDER Pathfinding tweaks or issues performance Make it faster!

Comments

@kianzarrin
Copy link
Collaborator

Junction restriction manager calculates and stores default traffic rules on segment end update but IsDefault<TrafficRule>Allowed is not using the cached value most of the times. This means they are recalculated for every path find.

We need to introduce new internal methods:
CalcualteDefault<TrafficRule>Allowed() : called on segment end update
Calcualte<TrafficRule>IsConfigurable() : called on segment end update

This way IsDefault<TrafficRule>Allowed() Is<TrafficRule>IsConfigurable() need only access the cached value which is fast.

I will elaborate more on this when I have time.

@kianzarrin kianzarrin added feature A new distinct feature triage Awaiting issue categorisation performance Make it faster! labels May 22, 2020
@originalfoo
Copy link
Member

Good catch!!

@originalfoo originalfoo added JUNCTION RESTRICTIONS Feature: Junction restrictions PATHFINDER Pathfinding tweaks or issues and removed triage Awaiting issue categorisation labels May 22, 2020
@kianzarrin
Copy link
Collaborator Author

@Elesbaan70 is this true? if so have you already fixed this?

If this is fixed or is a duplicate please close the issue.

@Elesbaan70
Copy link
Contributor

Yes, this is resolved by my PR. I'll mark the PR as resolving this when merged.

@Elesbaan70 Elesbaan70 linked a pull request Jun 16, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new distinct feature JUNCTION RESTRICTIONS Feature: Junction restrictions PATHFINDER Pathfinding tweaks or issues performance Make it faster!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants