TMPE icon indicating copy to clipboard operation
TMPE copied to clipboard

Junction restriction manager is not using the cache it has

Open kianzarrin opened this issue 4 years ago • 3 comments

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 avatar May 22 '20 11:05 kianzarrin

Good catch!!

originalfoo avatar May 22 '20 11:05 originalfoo

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

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

kianzarrin avatar Jun 16 '22 15:06 kianzarrin

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

Elesbaan70 avatar Jun 16 '22 17:06 Elesbaan70