Skip to content

Conversation

@lulu-sk
Copy link
Owner

@lulu-sk lulu-sk commented Dec 11, 2025

  1. 索引器优化(indexer.ts):

    • 引入 stripDetailsForPersist 方法,在持久化 history.details 时剔除高占用的 messages 字段,仅保留摘要信息,显著降低内存驻留与磁盘I/O开销。
    • 优化 DETAILS_CACHE_LIMIT 缓存策略。
  2. 资源清理(indexer.ts):

    • 增强 stopHistoryIndexer 清理逻辑,显式清除所有 pending 状态的重试定时器 (clearTimeout)。
    • 退出时清空 rescanCooldown 映射,确保无残留对象引用。
  3. 前端性能(App.tsx):

    • 优化 buildFilteredText 依赖项 (添加 selectedSessionFingerprint 等),减少无效计算与重渲染。
    • 调整 Effect 依赖,确保视图更新更精准。
  4. 国际化与文案:

    • 更新中英文 Locale (history.json, terminal.json),新增终端启动失败、复制行等文案。

1. 索引器优化(indexer.ts):
   - 引入 `stripDetailsForPersist` 方法,在持久化 `history.details` 时剔除高占用的 `messages` 字段,仅保留摘要信息,显著降低内存驻留与磁盘I/O开销。
   - 优化 `DETAILS_CACHE_LIMIT` 缓存策略。

2. 资源清理(indexer.ts):
   - 增强 `stopHistoryIndexer` 清理逻辑,显式清除所有 pending 状态的重试定时器 (`clearTimeout`)。
   - 退出时清空 `rescanCooldown` 映射,确保无残留对象引用。

3. 前端性能(App.tsx):
   - 优化 `buildFilteredText` 依赖项 (添加 `selectedSessionFingerprint` 等),减少无效计算与重渲染。
   - 调整 Effect 依赖,确保视图更新更精准。

4. 国际化与文案:
   - 更新中英文 Locale (`history.json`, `terminal.json`),新增终端启动失败、复制行等文案。
@lulu-sk lulu-sk self-assigned this Dec 11, 2025
@lulu-sk lulu-sk merged commit 8cbb966 into master Dec 11, 2025
2 of 4 checks passed
@lulu-sk lulu-sk deleted the optimize/memory-reduction branch December 11, 2025 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants