mirror of
https://github.com/home-assistant/core.git
synced 2025-12-26 14:08:21 +00:00
Reduce in progress flow matching overhead (#94403)
* Reduce config flow matching overhead Much of the config flow matching is happening on the context data after converting via a series of functions. Avoid the conversions by passing the context matcher deeper into the stack so only relvant entries need to be processed. The goal is to reduce the overhead and reduce the chance the event loop falls behind at the started event when all the discoveries are processed * Reduce config flow matching overhead Much of the config flow matching is happening on the context data after converting via a series of functions. Avoid the conversions by passing the context matcher deeper into the stack so only relvant entries need to be processed. The goal is to reduce the overhead and reduce the chance the event loop falls behind at the started event when all the discoveries are processed * Reduce config flow matching overhead Much of the config flow matching is happening on the context data after converting via a series of functions. Avoid the conversions by passing the context matcher deeper into the stack so only relvant entries need to be processed. The goal is to reduce the overhead and reduce the chance the event loop falls behind at the started event when all the discoveries are processed * augment cover
This commit is contained in:
@@ -462,6 +462,22 @@ async def test_async_has_matching_flow(
|
||||
assert result["progress_action"] == "task_one"
|
||||
assert len(manager.async_progress()) == 1
|
||||
assert len(manager.async_progress_by_handler("test")) == 1
|
||||
assert (
|
||||
len(
|
||||
manager.async_progress_by_handler(
|
||||
"test", match_context={"source": config_entries.SOURCE_HOMEKIT}
|
||||
)
|
||||
)
|
||||
== 1
|
||||
)
|
||||
assert (
|
||||
len(
|
||||
manager.async_progress_by_handler(
|
||||
"test", match_context={"source": config_entries.SOURCE_BLUETOOTH}
|
||||
)
|
||||
)
|
||||
== 0
|
||||
)
|
||||
assert manager.async_get(result["flow_id"])["handler"] == "test"
|
||||
|
||||
assert (
|
||||
|
||||
Reference in New Issue
Block a user