rjmcginness commented on code in PR #26596:
URL: https://github.com/apache/airflow/pull/26596#discussion_r978796781
##########
airflow/models/xcom_arg.py:
##########
@@ -388,6 +388,9 @@ class _ZipResult(Sequence):
def __init__(self, values: Sequence[Sequence | dict], *, fillvalue: Any =
NOTSET) -> None:
self.values = values
self.fillvalue = fillvalue
+ # use the generator here, rather than in __len__ to improve efficiency
+ lengths = (len(v) for v in self.values)
+ self.length = min(lengths) if isinstance(self.fillvalue, ArgNotSet)
else max(lengths)
Review Comment:
Just saw this. Sure. I can reverse it.
--
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]