This repository has been archived on 2026-09-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
zhiyi/src
小唯 A06 dbb4fbd60b perf: recall 性能优化 — BGE批量编码 + TTL缓存 + 图谱缓存
- BGE 批量编码:5个 expanded query 从串行5次HTTP合并为1次批量调用
  减少 HTTP RTT 开销 (~600ms → ~150ms)
- Recall 结果缓存:TTL 60s,LRU 200条,相同 query 直接返回 ~2ms
- Graph related_map 缓存:TTL 120s,减少重复的 SQLite 图查询
- Graph boost 限制 top-20 结果 + 避免重复 doc_entities 查询(N+1优化)

冷启动 QPS: ~11(与优化前持平)
热启动 QPS: ~500(缓存命中,~2ms/次)
2026-05-27 15:21:17 +08:00
..
2026-05-26 17:39:07 +08:00