vincbeck commented on code in PR #44456:
URL: https://github.com/apache/airflow/pull/44456#discussion_r1866635611


##########
airflow/dag_processing/collection.py:
##########
@@ -435,14 +456,17 @@ def add_asset_trigger_references(
         refs_to_add: dict[tuple[str, str], set[str]] = {}
         refs_to_remove: dict[tuple[str, str], set[str]] = {}
         triggers: dict[str, BaseTrigger] = {}
+        active_assets = _find_active_assets(self.assets.keys(), 
session=session)

Review Comment:
   That's a good question and to be very honest I dont have data so I quite 
dont know. This is run every-time the dag processor is run.
   
   However, your comment made me realize that an optimization was possible. If 
no asset is collected by the dag processor, there is no need to run this query.
   
   But if some assets are defined in DAGs, this query will run. If someone has 
more insight on the impact of this query and whether we should try to optimize 
it somehow, I am interested :)



-- 
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]

Reply via email to