Skip to content

perf: LB-23 内存基线——cacheWidth 收口 + ImageCache 256MB + 水位基线 - #227

Merged
KerroKapple merged 3 commits into
mainfrom
perf/lb-23-memory-baseline
Aug 18, 2026
Merged

perf: LB-23 内存基线——cacheWidth 收口 + ImageCache 256MB + 水位基线#227
KerroKapple merged 3 commits into
mainfrom
perf/lb-23-memory-baseline

Conversation

@KerroKapple

Copy link
Copy Markdown
Owner

概要

LB-23 四子项收口(计划:docs/superpowers/plans/2026-07-31-lb-23-memory-baseline.md,随本 PR 入库):

  1. cacheWidth 缩略解码收口 ×4 文件 5 站点:gallery tile(图片预览 + feat(gallery): PR-3 视频缩略图+点击播放(Polish Wave 1;M4 GA-1/2/7) #208 新增的视频缩略图)、batch results grid(180px)、node_inputs_section / image_config_inspector 两处微缩略图(28/20px)。一张 2048² 原图全解码 16MB,缩到 220px tile 只要 ~0.8MB。gallery_image_lightbox 有意豁免并注释:InteractiveViewer 缩放需全分辨率。
  2. ImageCache 上限 100MB→256MBkImageCacheMaxBytescore/constants/image_cache.dart)+ configureImageCache()(main bootstrap 于 ensureInitialized 后调用)。依据:收口后画廊 100 项工作集 ≈80MB 贴默认上限,滚动即抖动淘汰。
  3. perf-baseline.md 内存水位节:方法论(RSS 采集口径)+ 三场景阈值(空载 <400MB / 画廊 100 项 <800MB / 连续生成回落 <900MB)+ mac 空载实测 140MB(release,30s 稳定;嵌入式 PG 子进程另 23MB)。画廊/生成/Windows 列如实标待测,不编数。
  4. keepAlive 常驻盘点:grep 复核 8 文件,无未管控大对象,入档。

测试

  • 新增 3 例:gallery tile 图片/视频缩略图 ResizeImage 断言(TDD 先红后绿)+ imageCache 上限行为测。
  • flutter analyze lib test 无 issue;flutter test --exclude-tags golden 1948 全绿。

状态回填

BOARD 近期落地表 + MASTERPLAN LB-23 ✅ + backend 计划状态行;顺手修 BOARD XM-2 行残留的「本 PR」占位 → #226

🤖 Generated with Claude Code

Kerro and others added 3 commits August 18, 2026 14:29
…处微缩略图缩略解码,lightbox 有意豁免

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…LAN/backend 计划三处状态 + 计划文档入库

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@KerroKapple
KerroKapple merged commit d62914a into main Aug 18, 2026
5 checks passed
@KerroKapple
KerroKapple deleted the perf/lb-23-memory-baseline branch August 18, 2026 07:34
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.

1 participant