fix: optimize update list performance and fix detail view issues - #332
fix: optimize update list performance and fix detail view issues#332xionglinlin wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Sorry @xionglinlin, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: xionglinlin The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's GuideOptimizes the system update list performance and detail view behavior by caching parsed vulnerability levels for sorting/counting, tightening sort comparators, removing hot-path debug logs, and reworking the QML detail list to use lazy loading and ListView virtualization with an improved toggle UX and scrollbar handling. Sequence diagram for expanded/collapsed update detail list with Loader and ListView virtualizationsequenceDiagram
actor User
participant UpdateList_qml as UpdateList_qml
participant itemCtl as itemCtl
participant detailLoader as detailLoader
participant detailView as ListView
User->>UpdateList_qml: click ToolButton
UpdateList_qml->>itemCtl: repeater.model.setExpanded(itemCtl.itemIndex, !itemCtl.showDetails)
itemCtl-->>detailLoader: showDetails changes
alt showDetails becomes true (expand)
detailLoader-->>detailLoader: active = true
detailLoader->>detailView: create ListView from sourceComponent
detailView-->>detailView: implicitHeight = min(max(contentHeight, 1), 500)
detailView-->>detailView: ScrollBar.vertical.policy = ScrollBar.AsNeeded
else showDetails becomes false (collapse)
detailLoader-->>detailLoader: active = false
detailLoader-->>detailLoader: preferredHeight = 0
detailLoader-->>detailView: destroy delegates
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
1. Cache parsed vulnerability level enum in SecurityUpdateLog at load time, sort and count by integer enum instead of looking up vulLevelMap per comparison, eliminating tens of thousands of debug log calls that caused ~6s UI freeze with 1500+ security updates 2. Fix non-strict weak ordering (>= 0) in security log sort comparators 3. Remove redundant debug logging from hot paths: vulLevelMap, addDetailInfo and setExplain 4. Replace detail list Repeater with Loader lazy creation + ListView virtualization, so collapsed cards instantiate zero delegates and expanded lists only create visible items, eliminating ~9s page freeze 5. Merge expand/collapse into a single toggle button (View More <-> Collapse) at the card title row instead of a Collapse button at the end of a long list 6. Show scrollbar only when content overflows and keep it always visible while scrollable; fix 400px blank placeholder after collapsing by zeroing Loader height and letting viewport height shrink with content Log: Update page no longer freezes for seconds with large update sets; detail list scrolls smoothly and collapses without blank space Influence: 1. Open Control Center > System Update with a large number of updates (1500+ security CVEs), verify page opens and list renders instantly 2. Expand system/security update details, verify scrolling is smooth and scrollbar appears only when content overflows 3. Click Collapse at the title row, verify details collapse and no blank placeholder remains 4. Verify small update sets (few items) show no scrollbar and no extra spacing 5. Regression: check update, download, install flows are unaffected fix: 优化更新列表性能并修复详情展示问题 1. SecurityUpdateLog 装载时预解析漏洞等级枚举,排序与统计直接用整数枚举 比较,不再每次比较查询 vulLevelMap 并输出日志,消除 1500+ 条安全更新 场景下约 6 秒的 UI 卡顿 2. 修复安全日志排序比较器中 >= 0 导致的非严格弱序问题 3. 移除热路径上的冗余调试日志:vulLevelMap、addDetailInfo、setExplain 4. 详情列表由 Repeater 一次性实例化改为 Loader 惰性创建 + ListView 虚拟化, 折叠时零 delegate,展开时仅实例化可视区项,消除页面打开约 9 秒卡顿 5. 展开/收起合并为卡片标题行同一位置的切换按钮(View More <-> Collapse), 收起按钮不再沉在长列表末尾 6. 滚动条仅内容超出一屏时显示,可滚动时常显不透明;修复折叠后残留 400px 空白占位(Loader 高度归零、视口高度随内容收缩) Log: 更新页面在大规模更新场景下不再长时间卡顿,详情列表滚动流畅、 收起后无空白占位 PMS: BUG-373703 Change-Id: Ia7df7725faea365dc6bec3dad9f369df9e49b0c6
Log: Update page no longer freezes for seconds with large update sets; detail list scrolls smoothly and collapses without blank space
Influence:
fix: 优化更新列表性能并修复详情展示问题
Log: 更新页面在大规模更新场景下不再长时间卡顿,详情列表滚动流畅、
收起后无空白占位
PMS: BUG-373703
Change-Id: Ia7df7725faea365dc6bec3dad9f369df9e49b0c6
Summary by Sourcery
Optimize large update-list rendering and correct security detail sorting, expansion, and scrolling behavior.
Bug Fixes:
Enhancements: