Fix: UI performance when downloading - #53
Merged
Lakr233 merged 2 commits intoFeb 28, 2026
Merged
Conversation
Move per-manifest row content from DownloadView's ForEach closure into a dedicated PackageManifestRow view. This isolates @observable property reads (state.percent, hint) to each row's own observation scope, so progress changes on one manifest only re-render that specific row instead of the entire download list. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Throttle .progress{} callback to fire at most once per 200ms (always
allow fraction >= 1.0 through immediately). Reduces UI updates from
dozens/sec to ~5/sec per download.
- Batch two separate struct field mutations into a single copy-modify-
assign, halving @observable withMutation notifications per update.
- Remove saveManifests() from progress/speed callbacks. Progress
percentage is transient state; terminal state changes (complete,
pause, error) already persist via their own saveManifests() calls.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
eric1932
force-pushed
the
fix/download-progress-ui-performance
branch
from
February 28, 2026 15:04
b6b08ba to
810061b
Compare
Contributor
Author
|
hash 函数还原了
尝试了移除@State,还是会卡 还是需要隔离组件 & 控制刷新频次(现有的两个 commit) |
bo2themax
approved these changes
Feb 28, 2026
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.

下载 IPA 过程中滑动下载页面会出现明显的卡顿和设备发热,原因是整个页面 UI 一直被下载进度更新导致重绘。
做了以下修改