ColtenOuO opened a new pull request, #66306: URL: https://github.com/apache/airflow/pull/66306
## Summary Converts [`RUNTIME_VARYING_CALLS`](https://github.com/apache/airflow/blob/main/airflow-core/src/airflow/utils/dag_version_inflation_checker.py#L24) from `list` to `frozenset`. ## Why The container is exclusively used for membership tests; it is never iterated, indexed, or mutated. Therefore, frozenset is the more idiomatic data structure for this use case.While the absolute savings on a single lookup are sub-microsecond, this change is forward-looking. The search overhead for a list grows linearly $O(n)$ with table size, whereas frozenset provides constant time $O(1)$ lookups. This ensures that adding more runtime-varying call sites in the future won't impact performance. It is a refinement of code style and correctness rather than a measurable production speedup. ## Reference: [Python TimeComplexity wiki](https://wiki.python.org/moin/TimeComplexity) — `x in list` is O(n), `x in set/frozenset` is O(1) average. -- 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]
