1
0
mirror of https://github.com/home-assistant/supervisor.git synced 2025-12-24 20:35:55 +00:00

Use aiohttp-fast-url-dispatcher to avoid linear searching to route urls (#4705)

Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
Paulus Schoutsen
2023-11-16 16:52:31 -05:00
committed by GitHub
parent cca74da1f3
commit 030527a4f2
2 changed files with 3 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
aiodns==3.1.1
aiohttp==3.8.6
aiohttp-fast-url-dispatcher==0.1.0
async_timeout==4.0.3
atomicwrites-homeassistant==1.4.1
attrs==23.1.0

View File

@@ -5,6 +5,7 @@ from pathlib import Path
from typing import Any
from aiohttp import web
from aiohttp_fast_url_dispatcher import FastUrlDispatcher, attach_fast_url_dispatcher
from ..const import AddonState
from ..coresys import CoreSys, CoreSysAttributes
@@ -64,6 +65,7 @@ class RestAPI(CoreSysAttributes):
"max_field_size": MAX_LINE_SIZE,
},
)
attach_fast_url_dispatcher(self.webapp, FastUrlDispatcher())
# service stuff
self._runner: web.AppRunner = web.AppRunner(self.webapp)