tirkarthi opened a new pull request, #57624: URL: https://github.com/apache/airflow/pull/57624
* In order to show the count of import errors the API call is made with default limit value and then `total_entries` is the value used with rest of the response unused. Using limit as 1 fetches only one entry but the `total_entries` remains the same. In an instance with 500 dag import errors 1.46 kB (25.23kB uncompressed) in 268ms became 539 bytes (543 bytes uncompressed) in 50ms. * Don't fetch import errors until the modal is open. This opens up a slot in browser to be used for another request during dashboard and dags list page. * In order to check for auto refresh in case of pending runs the queries are made to fetch dagruns in running or queued state. The default limit fetches the dagrun entries which are not used in the UI. Similar to import errors use limit 1 can be used since the underlying check is only about being greater than zero for auto refresh. In scenarios with many running/queued dagruns this will result in efficient decision about whether to auto refresh or not since only one entry needs to be fetched to make the decision. It also reduces the amount of rows fetched from database. In an instance with 8 dagruns in running state 1.85kB (19.49 kB uncompressed) in 300ms became 570 bytes (800 bytes uncompressed) in 170ms. -- 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]
