mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Use bytes join fast path for large states payload (#110694)
b"".join has a fast path for when there are more than two bytes-strings
to combine
f383ca1a6f/Objects/stringlib/join.h (L123)
This commit is contained in:
@ -356,7 +356,9 @@ def _send_handle_get_states_response(
|
||||
) -> None:
|
||||
"""Send handle get states response."""
|
||||
connection.send_message(
|
||||
construct_result_message(msg_id, b"[" + b",".join(serialized_states) + b"]")
|
||||
construct_result_message(
|
||||
msg_id, b"".join((b"[", b",".join(serialized_states), b"]"))
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user