kaxil commented on a change in pull request #8772:
URL: https://github.com/apache/airflow/pull/8772#discussion_r422121186
##########
File path: airflow/serialization/serialized_objects.py
##########
@@ -285,10 +297,14 @@ class SerializedBaseOperator(BaseOperator,
BaseSerialization):
_decorated_fields = {'executor_config'}
- _CONSTRUCTOR_PARAMS = {
- k: v for k, v in signature(BaseOperator).parameters.items()
- if v.default is not v.empty
- }
+ @staticmethod
+ @functools.lru_cache(maxsize=128)
Review comment:
Can you add a comment on the benefits / need of using `lru_cache` here
##########
File path: airflow/serialization/serialized_objects.py
##########
@@ -285,10 +297,14 @@ class SerializedBaseOperator(BaseOperator,
BaseSerialization):
_decorated_fields = {'executor_config'}
- _CONSTRUCTOR_PARAMS = {
- k: v for k, v in signature(BaseOperator).parameters.items()
- if v.default is not v.empty
- }
+ @staticmethod
+ @functools.lru_cache(maxsize=128)
Review comment:
Can you add a comment on the benefits / need of using `lru_cache` here,
please?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]