Copilot commented on code in PR #169:
URL: https://github.com/apache/otava/pull/169#discussion_r3854627653
##########
otava/series.py:
##########
@@ -320,8 +350,9 @@ def append(self, time, new_data, attributes):
# r has a subset of all metrics, so can't just set change_points to r
for metric, cpglist in r.items():
self.change_points[metric] = cpglist
- self.weak_change_points = w
- self.change_points_by_time = self.change_points.by_time()
+ self.__weak_change_points = w
+ self.__change_points_by_time = self.change_points.by_time()
Review Comment:
This eagerly rebuilds the by-time view on every append, even when
`change_points_by_time` is never read, so that property is not fully lazy as
requested by #79. Invalidate this cache instead; its property will rebuild it
on first access from the updated metric cache.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]