长章节内存优化 P0:每页子串改按需构造并新增内存打点
- RDEPUBTextPage.content 由存储属性改为基于 chapterContent+contentRange 的计算属性,三处构造点不再生成每页子串,章节缓存窗口内每章少一份 整章文本常驻副本 - 新增 RDEPUBMemoryProbe(--demo-memory-probe 开启),在章节插入、 每 20 次翻页、设置失效、转屏完成时输出 phys_footprint - shouldAvoidReaderPageCaching 补注释,锁定放开前置条件为 P1-1 - 新增实施清单文档 LONG_CHAPTER_MEMORY_OPTIMIZATION_PLAN.md 并勾选 P0 验证:Demo 编译通过;UI 回归 9/9 通过(PageNavigation/ ReaderOpenClose/LargeBookOnDemand) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
5a41066b66
commit
e4e629a06c
@@ -322,6 +322,9 @@ final class RDEPUBTextContentView: UIView, UIGestureRecognizerDelegate, RDReader
|
||||
// layouter alive for the visible page. Avoid reader-level page
|
||||
// caching so preloading does not retain several full-chapter
|
||||
// display copies at once.
|
||||
// Do NOT relax this until chapter-level shared display content
|
||||
// lands (LONG_CHAPTER_MEMORY_OPTIMIZATION_PLAN.md P1-1): cached
|
||||
// pages would each pin their own full-chapter copy again.
|
||||
return currentPage == nil
|
||||
|| loadingSpinner.isAnimating
|
||||
|| coreTextDisplayContent != nil
|
||||
|
||||
Reference in New Issue
Block a user