Skip to content

Conversation

@HynoR
Copy link
Contributor

@HynoR HynoR commented Nov 27, 2025

What this PR does / why we need it?

dashboard 首屏并发请求很多重复信息,这些信息阻塞了很多模块的渲染,导致用户感受卡顿。

Summary of your change

通过缓存策略和分析用户心理,加快组件渲染速度。再根据需求异步刷新这些数据,用户用不到、看不见的数据直接读加载好缓存而不是再请求后端。用户重复访问 dashboard 时,所有信息不再阻塞渲染。

  • 修改首次请求时的顺序,异步延迟加载优先级低的信息
  • 大部分低变化的信息缓存在浏览器中,未过期或者未登出时,dashboard 直接从这里面拿,没必要重复请求后端。通过缓存策略能加快渲染速度。
  • 为了避免缓存中数据不同步,按需刷新数据,用户鼠标移动到监控卡片或者应用卡片时,刷新缓存
  • 添加两个手动刷新按钮让用户手动刷新数据兜底。
  • 修改进入首屏时,检查自动更新的逻辑,放到最后再检查,且 24 小时内不会再调用。这个自动更新会卡很久很久,基本上dashboard 的一半时间都被他阻塞了。

Please indicate you've done the following:

  • Made sure tests are passing and test coverage is added if needed.
  • Made sure commit message follow the rule of Conventional Commits specification.
  • Considered the docs impact and opened a new docs issue or PR with docs changes if needed.

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Nov 27, 2025

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.

Instructions 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.

@f2c-ci-robot
Copy link

f2c-ci-robot bot commented Nov 27, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign wanghe-fit2cloud for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wanghe-fit2cloud wanghe-fit2cloud merged commit e89311d into 1Panel-dev:dev-v2 Nov 27, 2025
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants