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

perf: add caching for system configuration fetcher to enhance performance #7100

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

guqing
Copy link
Member

@guqing guqing commented Dec 2, 2024

What type of PR is this?

/kind improvement
/area core
/milestone 2.20.x

What this PR does / why we need it:

为系统配置获取增加缓存以提高路由和主题模板渲染的速度

Special notes for your reviewer:

  1. 系统能正确初始化
  2. 测试修改系统配置后 http://localhost:8090/actuator/globalinfo 和主题端 ${site} 是否都是新的
  3. 更改了文章路由规则后能正确调整到新的规则

Does this PR introduce a user-facing change?

为系统配置的获取增加缓存以提高路由和主题模板渲染的速度

@f2c-ci-robot f2c-ci-robot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/improvement Categorizes issue or PR as related to a improvement. labels Dec 2, 2024
@f2c-ci-robot f2c-ci-robot bot added this to the 2.20.x milestone Dec 2, 2024
@f2c-ci-robot f2c-ci-robot bot requested a review from JohnNiang December 2, 2024 03:35
@f2c-ci-robot f2c-ci-robot bot added the area/core Issues or PRs related to the Halo Core label Dec 2, 2024
@f2c-ci-robot f2c-ci-robot bot requested a review from ruibaby December 2, 2024 03:35
Copy link

codecov bot commented Dec 2, 2024

Codecov Report

Attention: Patch coverage is 89.18919% with 4 lines in your changes missing coverage. Please review.

Project coverage is 57.26%. Comparing base (eff73dc) to head (8d6ea2f).
Report is 70 commits behind head on main.

Files with missing lines Patch % Lines
...pp/infra/SystemConfigurableEnvironmentFetcher.java 94.11% 1 Missing and 1 partial ⚠️
...pp/core/endpoint/console/SystemConfigEndpoint.java 0.00% 1 Missing ⚠️
...halo/app/security/preauth/SystemSetupEndpoint.java 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #7100      +/-   ##
============================================
+ Coverage     56.99%   57.26%   +0.26%     
- Complexity     3999     4023      +24     
============================================
  Files           714      713       -1     
  Lines         24110    24232     +122     
  Branches       1585     1593       +8     
============================================
+ Hits          13742    13876     +134     
+ Misses         9756     9741      -15     
- Partials        612      615       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@ruibaby ruibaby left a comment

Choose a reason for hiding this comment

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

/lgtm

@f2c-ci-robot f2c-ci-robot bot added the lgtm Indicates that a PR is ready to be merged. label Dec 4, 2024
Copy link
Member

@JohnNiang JohnNiang left a comment

Choose a reason for hiding this comment

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

/approve

Copy link

f2c-ci-robot bot commented Dec 4, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JohnNiang

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

The pull request process is described 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

@f2c-ci-robot f2c-ci-robot bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 4, 2024
@f2c-ci-robot f2c-ci-robot bot merged commit 2b4d1ab into halo-dev:main Dec 4, 2024
7 checks passed
@guqing guqing deleted the refactor/cache-syste-config branch December 4, 2024 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/core Issues or PRs related to the Halo Core kind/improvement Categorizes issue or PR as related to a improvement. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants