Repository navigation
fix(reader): reduce long-strip scroll jank in continuous scroll - #112
Merged
Merged
Conversation
added 3 commits
November 29, 2026 03:50
Fixes several compounding bottlenecks on the webtoon/long-strip reading hot path: - ReaderStripTileLayer: drop levelsOfDetailBias (2 -> 0). Long strips render at fitWidth and are never zoomed, so the magnification LOD tiers only force the highest-LOD tile on first display and keep extra magnified bitmaps resident for no benefit. - ReaderStripTileLayer.draw: draw the full image once and let Core Graphics clip to the tile's dirty region instead of allocating a fresh bitmap via CGImage.cropping(to:) on every draw callback. - ReaderImageCache: continuous scroll now keeps a neighbour decode running even while a foreground page is decoding (new allowConcurrentDuringForegroundLoad flag) and preloads with maximumConcurrent 2, so the pipeline no longer stalls during a fast scroll. - ContinuousScrollReader: widen retainsDecodedImage from <= 3 to <= 5 so scrolling back up does not re-decode recently rendered pages. Adds docs/reader-strip-scroll-performance-review-2026-11-29.md with the full audit and remaining lower-priority follow-ups.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
条漫连续滚动
快速滑过分页边界时,阅读器需要用最新页框确定当前页,给可见页保留解码资源,并在反向滑动时复用邻页图片。
验证
最终实测
5dac48a的远端 Release 构建通过。单元测试 701 项通过、10 项跳过,Manga Vision 回归 6 项通过,UI 测试 9 项通过、1 项跳过。三项新增单测与长条往返 UI 用例均通过。iPhone 17 模拟器、iOS 26.5 的长条往返用例记录了以下进程物理内存峰值(按十进制 MB 换算)。
最终提交的 25 次向前快滑确实跨页,25 次反向快滑后回到了起始页。各版本数字均为一次 CI 测量,早期用例缺少页码断言。最终 xcresult 只提供了内存指标,尚无 iPhone 掉帧率数据。