Speed up websocket and ingress with aiohttp-zlib-ng (#103247)

This commit is contained in:
J. Nick Koston 2023-11-02 15:18:12 -05:00 committed by GitHub
parent 35e1ecec8d
commit 45f5c21402
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 15 additions and 1 deletions

View File

@ -23,6 +23,7 @@ from aiohttp.web_urldispatcher import (
UrlDispatcher,
UrlMappingMatchInfo,
)
from aiohttp_zlib_ng import enable_zlib_ng
from cryptography import x509
from cryptography.hazmat.primitives import hashes, serialization
from cryptography.hazmat.primitives.asymmetric import rsa
@ -173,6 +174,8 @@ class ApiConfig:
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool:
"""Set up the HTTP API and debug interface."""
enable_zlib_ng()
conf: ConfData | None = config.get(DOMAIN)
if conf is None:

View File

@ -6,5 +6,5 @@
"integration_type": "system",
"iot_class": "local_push",
"quality_scale": "internal",
"requirements": ["aiohttp_cors==0.7.0"]
"requirements": ["aiohttp_cors==0.7.0", "aiohttp-zlib-ng==0.1.1"]
}

View File

@ -1,4 +1,5 @@
aiodiscover==1.5.1
aiohttp-zlib-ng==0.1.1
aiohttp==3.8.5;python_version<'3.12'
aiohttp==3.9.0b0;python_version>='3.12'
aiohttp_cors==0.7.0

View File

@ -25,6 +25,8 @@ requires-python = ">=3.11.0"
dependencies = [
"aiohttp==3.9.0b0;python_version>='3.12'",
"aiohttp==3.8.5;python_version<'3.12'",
"aiohttp_cors==0.7.0",
"aiohttp-zlib-ng==0.1.1",
"astral==2.2",
"attrs==23.1.0",
"atomicwrites-homeassistant==1.4.1",

View File

@ -3,6 +3,8 @@
# Home Assistant Core
aiohttp==3.9.0b0;python_version>='3.12'
aiohttp==3.8.5;python_version<'3.12'
aiohttp_cors==0.7.0
aiohttp-zlib-ng==0.1.1
astral==2.2
attrs==23.1.0
atomicwrites-homeassistant==1.4.1

View File

@ -257,6 +257,9 @@ aioharmony==0.2.10
# homeassistant.components.homekit_controller
aiohomekit==3.0.9
# homeassistant.components.http
aiohttp-zlib-ng==0.1.1
# homeassistant.components.emulated_hue
# homeassistant.components.http
aiohttp_cors==0.7.0

View File

@ -235,6 +235,9 @@ aioharmony==0.2.10
# homeassistant.components.homekit_controller
aiohomekit==3.0.9
# homeassistant.components.http
aiohttp-zlib-ng==0.1.1
# homeassistant.components.emulated_hue
# homeassistant.components.http
aiohttp_cors==0.7.0