mirror of
https://github.com/usestrix/strix.git
synced 2026-09-14 14:19:09 +08:00
fix(warmup): drop docker from WARMUP_MODULES
The Docker checks import the Docker SDK on the main thread before the warm-up join, so warming it saves nothing and leaves one module shared between the two threads during the startup window.
This commit is contained in:
+5
-5
@@ -1,10 +1,11 @@
|
|||||||
"""Background pre-import of the heavy scan dependencies.
|
"""Background pre-import of the heavy scan dependencies.
|
||||||
|
|
||||||
The scan engine's import graph (the agents SDK, OpenAI client, LiteLLM, the
|
The scan engine's import graph (the agents SDK, OpenAI client, LiteLLM, the
|
||||||
Caido SDK, the Docker SDK) costs seconds to import cold, but none of it is
|
Caido SDK) costs seconds to import cold, but none of it is needed until a scan
|
||||||
needed until a scan actually starts. Importing it on a daemon thread at CLI
|
actually starts. Importing it on a daemon thread at CLI entry overlaps that
|
||||||
entry overlaps that cost with the I/O-bound startup work that always precedes
|
cost with the I/O-bound startup work that always precedes a scan (argument
|
||||||
a scan (argument parsing, Docker checks, image pull, TUI setup).
|
parsing, Docker checks, image pull, TUI setup). The Docker SDK is not on the
|
||||||
|
list: the Docker checks import it on the main thread during that same window.
|
||||||
|
|
||||||
The main thread must call :func:`wait_for_import_warmup` before its first
|
The main thread must call :func:`wait_for_import_warmup` before its first
|
||||||
import from that graph. Two threads that enter the same package graph from
|
import from that graph. Two threads that enter the same package graph from
|
||||||
@@ -25,7 +26,6 @@ WARMUP_MODULES = (
|
|||||||
"strix.core.runner",
|
"strix.core.runner",
|
||||||
"litellm",
|
"litellm",
|
||||||
"caido_sdk_client",
|
"caido_sdk_client",
|
||||||
"docker",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
_thread: threading.Thread | None = None
|
_thread: threading.Thread | None = None
|
||||||
|
|||||||
Reference in New Issue
Block a user