Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions homeassistant/components/http/__init__.py
Expand Up @@ -23,6 +23,7 @@
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
Expand Down Expand Up @@ -173,6 +174,8 @@ def __init__(

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:
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/http/manifest.json
Expand Up @@ -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"]
}
1 change: 1 addition & 0 deletions homeassistant/package_constraints.txt
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Expand Up @@ -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",
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions requirements_all.txt
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions requirements_test_all.txt
Expand Up @@ -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
Expand Down