-
Notifications
You must be signed in to change notification settings - Fork 128
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
Adding cache for transfer_path #4213
Conversation
def _get_access_points(self, stop_point_uri, access_point_filter=lambda x: x): | ||
sub_request_id = "{}_transfer_start_{}".format(self._request_id, stop_point_uri) | ||
stop_points = self._instance.georef.get_stop_points_from_uri(stop_point_uri, sub_request_id, depth=2) | ||
def _get_access_points(self, pt_object, access_point_filter=lambda x: x): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there should be a more proper way to do it, you can create an abstract function in PtPlanner that returns access points, and the implementation should be "hidden" in the concrete class base on the type of PtPlanner,
|
||
def _do_access_point_transfer(self, section, prev_section_mode, next_section_mode): | ||
access_points = self.get_underlying_access_points(section, prev_section_mode, next_section_mode) | ||
return ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just need to be cautious/aware of the huge amount of string that could be generated by this thus impacting the performance cache/redis, (it's not particularly worrying since Asgard has been doing so...) On top of that, serialize/deserialize could be time-consuming as well
|
Jira: NAV-2719