Compare commits

..
Author SHA1 Message Date
Andrew BeveridgeandClaude e8b3c6a28b docs: Add lesson learned about preloading heavy resources at startup
Documents the pattern of moving heavy resource initialization from
request-time to container startup on Cloud Run for better performance.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 00:45:35 -05:00
Andrew BeveridgeandClaude 666ee965a9 docs: Update docs to reflect SpaCy preload implementation
- Update plan doc to reference actual test file location
- Update README to move SpaCy preloading from "Pending" to "Recent Changes"
- Replace inline test code with summary of actual tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 00:41:57 -05:00
Andrew BeveridgeandClaude 1600641b5b feat(perf): Preload SpaCy model at container startup
- Add backend/services/spacy_preloader.py singleton service
- Preload en_core_web_sm in FastAPI lifespan handler
- Modify PhraseAnalyzer to use preloaded model if available
- Modify SyllablesMatchHandler to use preloaded model if available
- Add timing logs to AnchorSequenceFinder and SyllablesMatchHandler init
- Add unit tests for spacy_preloader service

Eliminates 60+ second SpaCy model load during first job processing
on Cloud Run by moving the load to container startup.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 00:38:04 -05:00
Andrew BeveridgeandClaude Opus 4.5 4f8dac0161 docs: Add SpaCy preload implementation plan for job performance
- Created detailed implementation plan for SpaCy model preloading at
  container startup to eliminate 60+ second load delays during agentic
  correction (docs/archive/2026-01-08-spacy-preload-plan.md)
- Added "Pending Work" section to README.md for tracking planned work
- Updated README with PR #232 thread-safety fix in Recent Changes

Related to job 2ccbdf6b investigation where SpaCy loading took 63s
even on warm Cloud Run instances.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 00:22:37 -05:00

Diff Content Not Available