Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【feat】优化公共步骤页面的打开速度 #280

Merged

Conversation

caofengbin
Copy link
Contributor

@caofengbin caofengbin commented May 28, 2024

Whether this PR is eventually merged or not, Sonic will thank you very much for your contribution.

无论此PR最终是否合并,Sonic组织都非常感谢您的贡献。

Checklist

  • The title starts with fix, fea, or doc. | 标题为fix、feat或doc开头。
  • I have checked that there are no duplicate pull requests with this request. | 我已检查没有与此请求重复的拉取请求。
  • I have considered and confirmed that this submission is valuable to others. | 我已经考虑过,并确认这份呈件对其他人很有价值。
  • I accept that this submission may not be used. | 我接受此提交可能不会被使用。

Description

业务实际使用的过程中,发现公共步骤Page打开速度很慢,查看Ngnix日志经常会达到8秒以上

GET /server/api/controller/publicSteps/list?projectId=3&page=1&pageSize=15 HTTP/1.1" 200 "6.958" "74862"
GET /server/api/controller/publicSteps/list?projectId=3&page=2&pageSize=15 HTTP/1.1" 200 "9.158" "95470"
GET /server/api/controller/publicSteps/list?projectId=3&page=2&pageSize=15 HTTP/1.1" 200 "9.123" "95470"

排查耗时主要在拉取公共步骤列表的接口时,会遍历查询每个公共步骤的所有子步骤信息,并填充返回。

实际上子步骤的信息在列表展示时并不需要,这里优化为点击每个公共步骤的详情按钮时,再单独拉取子步骤信息,整体页面打开速度会明显提升。

Copy link
Member

@ZhouYixun ZhouYixun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mg

@ZhouYixun ZhouYixun merged commit d13e983 into SonicCloudOrg:main Jun 4, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants