Server cold start is ~34s, and it is almost entirely loading the 164 aroma RandomForest .joblib files (628 MB) at import. The substitute index is now fast (1.6s, cached). Options:
- Parallel model loading — load the 164 joblibs across a thread pool (deserialization + I/O); likely ~3x faster. Quick win.
- ONNX — convert aroma RFs to ONNX like the taste heads (export_onnx.py); faster load + smaller on disk.
- Lazy load — load aroma heads on first aroma request instead of at import (moves the cost, does not remove it).
Not urgent (the box stays up), but a real quality-of-life + demo-startup win.
Server cold start is ~34s, and it is almost entirely loading the 164 aroma RandomForest .joblib files (628 MB) at import. The substitute index is now fast (1.6s, cached). Options:
Not urgent (the box stays up), but a real quality-of-life + demo-startup win.