Optimize embedding service performance and refactor to English
-
Implement singleton pattern for SentenceTransformer model caching • Add ModelCacheSingleton class with thread-safe model loading • Reduce model initialization time from ~5s to ~0.1s on subsequent calls • Prevent memory leaks from multiple model instances
-
Refactor EmbeddingService to English naming conventions • Rename methods: traiter_lot → process_batch, generer_embedding → generate_embedding • Rename variables: modele_name → model_name, textes → texts • Translate all docstrings and comments to English • Replace print statements with structured logging
-
Update all service references across codebase • Fix method calls in document_preprocessing_view.py • Update embed_controller.py API endpoints • Correct management command references • Update recherche_service.py integration
-
Closes IA-436