mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 03:18:23 -05:00
[GH-ISSUE #20445] Improve dev container cold start time #34718
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @vlthr on GitHub (Jan 7, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/20445
Problem
The Docker dev container (
docker-compose.dev.yaml) has a slow cold start. The "Waiting for backend..." phase takes significant time even with optimizations applied.Current Optimizations (Limited Effect)
Already tried in
docker-compose.dev.yaml:These had limited effect on startup time.
Known Bottlenecks (from investigation)
config.py:70-run_migrations()vector/factory.py:78main.py:585env.pyconfig.py:83-125Root Cause Analysis
Many heavy operations happen at module import time, not at request time:
run_migrations()runs whenconfig.pyis importedVECTOR_DB_CLIENTis instantiated whenvector/factory.pyis importedSuggested Investigations
1. Backend Startup
python -X importtime2. Frontend Startup (Pyodide)
Dockerfile.devnpm run pyodide:fetchdownloads ~100MB on first run3. Other Ideas
--reload-excludeto reduce uvicorn file watching overheadENV=devtriggers any extra initializationRelated
Context
The dev container setup works but takes too long to become ready. This impacts developer iteration speed when restarting the container.