Repository navigation
v2.3.1 — P0: 消费超时 + 背压 + 信号处理 + 离线降级
Performance Release v2.3.1
Highlights
2636fd4— CronEngine ThreadPool + Audit Batched Async + LLM Cache/Concurrent
P0-3: CronEngine ThreadPool
- ThreadPoolExecutor(8 workers) + run_jobs_parallel() concurrent execution
- 2x speedup for parallel cron jobs (2 jobs: 0.2s → 0.1s)
- Per-job _running flag prevents duplicate concurrent execution
- Auto-register handler in register_job()
P1-4: Audit Batched Async Writes
- Module-level _batch_buffer (deque maxlen=1000)
- Background flush daemon: 50 entries OR 2s interval
- executemany() batch INSERT (1 DB tx vs N writes)
- start_batch_daemon() / stop_batch_daemon() lifecycle
P1-5: LLM Cache + Concurrent
cloud/brain/llm_cache.py— LRU+TTL cache (200 entries, 3600s TTL)- SHA256 key of (system, user, model, temperature)
- Optional disk persistence to /opt/clawshell/data/llm_cache.json
- Stats: hits/misses/evictions/hit_rate
cloud/brain/llm_concurrent.py— ThreadPoolExecutor(4 workers)- chat_batch() parallel queries with Future resolution
- chat() single with cache lookup
- Avoids redundant API calls for repeated queries
P2-6: TF-IDF (verified no change needed)
- Already on-demand compute at search time (not full rebuild on insert)
- O(n) per query with O(1) term_index lookup
Previous v2.3.1 P0 Fixes
173b29f— P0: claim timeout + backpressure + signal handler + offline mode
Verification (ECS Production)
- Engines: 20/20 active
- Tests: 620/621 pass (1 pre-existing task expiry test, unrelated)
- MemOS Key: validated (HTTP 200 from /search/memory endpoint)
Required API Keys
MEMOS_CLOUD_API_KEY(mpg-*) — https://memos.cloudDEEPSEEK_API_KEY(sk-*) — https://platform.deepseek.com/api_keys
Total Diff
4 files changed, 360 insertions(+), 8 deletions(-)