Incorrect use of the cache causes retrieving all issues for a series to be unnecessarily slow.
specifically the loop in _fetch_issues_in_series needs to move the call to self._fetch_series out of the loop.
# Format to expected output
formatted_series_issues_result = [
self._map_comic_issue_to_metadata(x, self._fetch_series(series_id)) for x in met_response
]
becomes
series = self._fetch_series(series_id)
# Format to expected output
formatted_series_issues_result = [
self._map_comic_issue_to_metadata(x, series) for x in met_response
]
I copied this from the CV talker and noted it at the time but forgot to follow up. Unless there is a reason I'm missing, I'll port the same change over to CV too?
Incorrect use of the cache causes retrieving all issues for a series to be unnecessarily slow. specifically the loop in
_fetch_issues_in_series
needs to move the call to self._fetch_series out of the loop.becomes