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

Reduce bootstrap time in the situation with large properties #3816

Merged

Conversation

Shawyeok
Copy link
Contributor

@Shawyeok Shawyeok commented Jul 8, 2021

What's the purpose of this PR

Reduce bootstrap time in the situation with large properties.

Use test method described in #3800, compare results:

  Baseline New
  11717ms 599ms
  12755ms 647ms
  12849ms 567ms
  11482ms 627ms
  11903ms 611ms
Stdev 622ms 30ms
Aveage 12141ms 610ms

Which issue(s) this PR fixes:

Fixes #3800

Brief changelog

Reduce bootstrap time in the situation with large properties.

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Read the Contributing Guide before making this pull request.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit tests to verify the code.
  • Run mvn clean test to make sure this pull request doesn't break anything.
  • Update the CHANGES log.

@github-actions
Copy link

github-actions bot commented Jul 8, 2021

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@Shawyeok
Copy link
Contributor Author

Shawyeok commented Jul 8, 2021

I have read the CLA Document and I hereby sign the CLA

@Shawyeok Shawyeok changed the title Speedup startup process via cache propertyNames Reduce bootstrap time in the situation with large properties Jul 8, 2021
@Shawyeok Shawyeok force-pushed the feature/cache-property-names branch 2 times, most recently from 389f967 to 04898e9 Compare July 8, 2021 12:31
@codecov-commenter
Copy link

codecov-commenter commented Jul 9, 2021

Codecov Report

Merging #3816 (c8e839d) into master (622e35a) will increase coverage by 0.16%.
The diff coverage is 87.50%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3816      +/-   ##
============================================
+ Coverage     49.93%   50.10%   +0.16%     
- Complexity     2442     2460      +18     
============================================
  Files           482      483       +1     
  Lines         14853    14891      +38     
  Branches       1507     1515       +8     
============================================
+ Hits           7417     7461      +44     
+ Misses         6914     6906       -8     
- Partials        522      524       +2     
Impacted Files Coverage Δ
...ramework/apollo/core/ApolloClientSystemConsts.java 0.00% <ø> (ø)
...va/com/ctrip/framework/apollo/util/ConfigUtil.java 81.56% <81.25%> (-0.04%) ⬇️
...o/spring/config/CachedCompositePropertySource.java 87.50% <87.50%> (ø)
...ring/boot/ApolloApplicationContextInitializer.java 94.33% <100.00%> (+0.33%) ⬆️
...ork/apollo/spring/config/ConfigPropertySource.java 100.00% <100.00%> (ø)
...apollo/spring/config/PropertySourcesProcessor.java 92.72% <100.00%> (+0.27%) ⬆️
...ervice/service/ReleaseMessageServiceWithCache.java 85.88% <0.00%> (-1.18%) ⬇️
.../apollo/internals/RemoteConfigLongPollService.java 78.31% <0.00%> (+1.20%) ⬆️
.../framework/apollo/spring/property/SpringValue.java 89.47% <0.00%> (+1.75%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 622e35a...c8e839d. Read the comment docs.

@Shawyeok Shawyeok force-pushed the feature/cache-property-names branch from 04898e9 to 2e89f18 Compare July 9, 2021 02:07
@Shawyeok Shawyeok force-pushed the feature/cache-property-names branch 2 times, most recently from 796d55f to 542951e Compare July 11, 2021 09:09
@Shawyeok Shawyeok requested a review from nobodyiam July 11, 2021 09:40
@Shawyeok Shawyeok force-pushed the feature/cache-property-names branch 2 times, most recently from f262156 to b37687c Compare July 15, 2021 05:25
@Shawyeok Shawyeok requested a review from nobodyiam July 15, 2021 05:29
@Shawyeok Shawyeok force-pushed the feature/cache-property-names branch from b37687c to 9979023 Compare July 16, 2021 06:17
Copy link
Member

@nobodyiam nobodyiam left a comment

Choose a reason for hiding this comment

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

Basically it looks good now except for some minor comments, thanks!

@nobodyiam
Copy link
Member

Please also update the branch and solve the conflicts in CHANGES.md.

@Shawyeok Shawyeok force-pushed the feature/cache-property-names branch from 9979023 to c8e839d Compare July 18, 2021 16:25
@Shawyeok
Copy link
Contributor Author

Please also update the branch and solve the conflicts in CHANGES.md.

Done.

@Shawyeok Shawyeok requested a review from nobodyiam July 18, 2021 16:28
Copy link
Member

@nobodyiam nobodyiam left a comment

Choose a reason for hiding this comment

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

LGTM

@nobodyiam nobodyiam merged commit 6d50ca8 into apolloconfig:master Jul 19, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jul 19, 2021
@Shawyeok Shawyeok deleted the feature/cache-property-names branch July 23, 2021 18:27
@nobodyiam nobodyiam added this to the 1.9.0 milestone Aug 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

大量配置项场景下应用启动非常慢
3 participants