feat: Enhance container data handling and status synchronization#12554
feat: Enhance container data handling and status synchronization#12554ssongliu merged 1 commit into1Panel-dev:dev-v2from
Conversation
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
What this PR does / why we need it?
在 Gecko / Firefox 浏览器中,如果容器页面开启高频自动刷新且停留一段时间,则浏览器会出现极为明显的卡顿现象,严重影响使用体验。
Profiler 排查显示 Vue 频繁 patch DOM 消耗大量 CPU,检查源码发现容器页刷新时会同时更新列表、状态统计、标签统计以及操作dropdown,单次刷新会触发多轮全量更新,vue 频繁 patch DOM 导致严重卡顿。
Summary of your change
修改更新逻辑,将 search(), refresh() 的更新逻辑改为并行拉取所有信息后统一合并,按需更新字段,减少 DOM patch 开销和无效更新,同时将容器状态 dropdown 改为弹出时渲染,避免随着 dom 一起全量更新等。
Please indicate you've done the following: