mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-25 18:16:32 +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:
parent
cca74da1f3
commit
030527a4f2
@ -1,5 +1,6 @@
|
|||||||
aiodns==3.1.1
|
aiodns==3.1.1
|
||||||
aiohttp==3.8.6
|
aiohttp==3.8.6
|
||||||
|
aiohttp-fast-url-dispatcher==0.1.0
|
||||||
async_timeout==4.0.3
|
async_timeout==4.0.3
|
||||||
atomicwrites-homeassistant==1.4.1
|
atomicwrites-homeassistant==1.4.1
|
||||||
attrs==23.1.0
|
attrs==23.1.0
|
||||||
|
@ -5,6 +5,7 @@ from pathlib import Path
|
|||||||
from typing import Any
|
from typing import Any
|
||||||
|
|
||||||
from aiohttp import web
|
from aiohttp import web
|
||||||
|
from aiohttp_fast_url_dispatcher import FastUrlDispatcher, attach_fast_url_dispatcher
|
||||||
|
|
||||||
from ..const import AddonState
|
from ..const import AddonState
|
||||||
from ..coresys import CoreSys, CoreSysAttributes
|
from ..coresys import CoreSys, CoreSysAttributes
|
||||||
@ -64,6 +65,7 @@ class RestAPI(CoreSysAttributes):
|
|||||||
"max_field_size": MAX_LINE_SIZE,
|
"max_field_size": MAX_LINE_SIZE,
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
attach_fast_url_dispatcher(self.webapp, FastUrlDispatcher())
|
||||||
|
|
||||||
# service stuff
|
# service stuff
|
||||||
self._runner: web.AppRunner = web.AppRunner(self.webapp)
|
self._runner: web.AppRunner = web.AppRunner(self.webapp)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user