Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
don't instantiate instance if not needed in sensor execution (#25429)
## Summary & Motivation We only use the CachingDynamicPartitionsLoader when there's a run request with partitions, and the CachingDynamicPartitionsLoader needs to hydrate the instance ref which is costly. to speed up the typical case, use @functools.cache to memoize the creation of the `CachingDynamicPartitionsLoader(context.instance)` ## How I Tested These Changes Ran 10k no-op sensor executions before and after the change, this dropped the latency from 20s to 2s
- Loading branch information