mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-22 23:31:12 +02:00
Major RAM savings (1.5-3GB reduction at startup): - Implement lazy loading for embedding model, chunker, and reranker - Models now load on first use instead of at startup - Reduce embedding batch_size from 128 to 32 (saves 100-200MB spikes) Celery memory optimizations: - Reduce result_expires from 24h to 1h (saves Redis RAM) - Reduce worker_max_tasks_per_child from 1000 to 100 - Add worker_max_memory_per_child=256MB limit to prevent leaks Before: ~2-4GB RAM at startup After: ~500MB-1GB at startup, models load on demand |
||
|---|---|---|
| .. | ||
| agents | ||
| config | ||
| connectors | ||
| prompts | ||
| retriver | ||
| routes | ||
| schemas | ||
| services | ||
| tasks | ||
| utils | ||
| __init__.py | ||
| app.py | ||
| celery_app.py | ||
| db.py | ||
| users.py | ||