You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/06/14 13:58:11 UTC

[GitHub] [dubbo] hdyztmdqd opened a new pull request, #10158: Optimization code

hdyztmdqd opened a new pull request, #10158:
URL: https://github.com/apache/dubbo/pull/10158

   ## What is the purpose of the change
   
   Optimization code
   
   1.Use StringBuilder#append(Char) to improve performance
   2.Replace runnable with lambda
   3.The original implementation calls the get method twice.Replace it with computeIfAbsent.
   
   
   ## Brief changelog
   
   
   ## Verifying this change
   
   
   <!-- Follow this checklist to help us incorporate your contribution quickly and easily: -->
   
   ## Checklist
   - [x] Make sure there is a [GitHub_issue](https://github.com/apache/dubbo/issues) field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
   - [ ] Each commit in the pull request should have a meaningful subject line and body.
   - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
   - [ ] Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
   - [ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in [dubbo samples](https://github.com/apache/dubbo-samples) project.
   - [ ] Add some description to [dubbo-website](https://github.com/apache/dubbo-website) project if you are requesting to add a feature.
   - [ ] GitHub Actions works fine on your own branch.
   - [ ] If this contribution is large, please follow the [Software Donation Guide](https://github.com/apache/dubbo/wiki/Software-donation-guide).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] codecov-commenter commented on pull request #10158: Optimization code

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #10158:
URL: https://github.com/apache/dubbo/pull/10158#issuecomment-1159899651

   # [Codecov](https://codecov.io/gh/apache/dubbo/pull/10158?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#10158](https://codecov.io/gh/apache/dubbo/pull/10158?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c7ae4e5) into [3.0](https://codecov.io/gh/apache/dubbo/commit/89863e048d745b5c655a6b859347b32939b743db?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (89863e0) will **decrease** coverage by `0.32%`.
   > The diff coverage is `61.40%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##                3.0   #10158      +/-   ##
   ============================================
   - Coverage     65.68%   65.36%   -0.33%     
   + Complexity      320      317       -3     
   ============================================
     Files          1224     1224              
     Lines         53413    53380      -33     
     Branches       8077     8044      -33     
   ============================================
   - Hits          35086    34891     -195     
   - Misses        14508    14654     +146     
   - Partials       3819     3835      +16     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo/pull/10158?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [.../rpc/cluster/router/state/RouterGroupingState.java](https://codecov.io/gh/apache/dubbo/pull/10158/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvcm91dGVyL3N0YXRlL1JvdXRlckdyb3VwaW5nU3RhdGUuamF2YQ==) | `0.00% <0.00%> (ø)` | |
   | [...ache/dubbo/qos/command/impl/GetRouterSnapshot.java](https://codecov.io/gh/apache/dubbo/pull/10158/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcGx1Z2luL2R1YmJvLXFvcy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcW9zL2NvbW1hbmQvaW1wbC9HZXRSb3V0ZXJTbmFwc2hvdC5qYXZh) | `10.71% <0.00%> (ø)` | |
   | [...he/dubbo/qos/server/handler/QosProcessHandler.java](https://codecov.io/gh/apache/dubbo/pull/10158/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcGx1Z2luL2R1YmJvLXFvcy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcW9zL3NlcnZlci9oYW5kbGVyL1Fvc1Byb2Nlc3NIYW5kbGVyLmphdmE=) | `58.33% <0.00%> (ø)` | |
   | [.../dubbo/remoting/http/jetty/JettyLoggerAdapter.java](https://codecov.io/gh/apache/dubbo/pull/10158/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVtb3RpbmcvZHViYm8tcmVtb3RpbmctaHR0cC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcmVtb3RpbmcvaHR0cC9qZXR0eS9KZXR0eUxvZ2dlckFkYXB0ZXIuamF2YQ==) | `73.33% <0.00%> (ø)` | |
   | [.../org/apache/dubbo/test/check/DubboTestChecker.java](https://codecov.io/gh/apache/dubbo/pull/10158/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tdGVzdC9kdWJiby10ZXN0LWNoZWNrL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby90ZXN0L2NoZWNrL0R1YmJvVGVzdENoZWNrZXIuamF2YQ==) | `34.92% <0.00%> (ø)` | |
   | [...he/dubbo/registry/multicast/MulticastRegistry.java](https://codecov.io/gh/apache/dubbo/pull/10158/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktbXVsdGljYXN0L3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9tdWx0aWNhc3QvTXVsdGljYXN0UmVnaXN0cnkuamF2YQ==) | `64.67% <25.00%> (ø)` | |
   | [...va/org/apache/dubbo/common/utils/ExecutorUtil.java](https://codecov.io/gh/apache/dubbo/pull/10158/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vdXRpbHMvRXhlY3V0b3JVdGlsLmphdmE=) | `63.79% <44.44%> (ø)` | |
   | [...etadata/report/support/AbstractMetadataReport.java](https://codecov.io/gh/apache/dubbo/pull/10158/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tbWV0YWRhdGEvZHViYm8tbWV0YWRhdGEtYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9tZXRhZGF0YS9yZXBvcnQvc3VwcG9ydC9BYnN0cmFjdE1ldGFkYXRhUmVwb3J0LmphdmE=) | `67.71% <55.55%> (ø)` | |
   | [...apache/dubbo/common/extension/ExtensionLoader.java](https://codecov.io/gh/apache/dubbo/pull/10158/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9jb21tb24vZXh0ZW5zaW9uL0V4dGVuc2lvbkxvYWRlci5qYXZh) | `78.80% <85.71%> (-1.04%)` | :arrow_down: |
   | [...e/dubbo/rpc/cluster/router/RouterSnapshotNode.java](https://codecov.io/gh/apache/dubbo/pull/10158/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvcm91dGVyL1JvdXRlclNuYXBzaG90Tm9kZS5qYXZh) | `81.08% <100.00%> (ø)` | |
   | ... and [84 more](https://codecov.io/gh/apache/dubbo/pull/10158/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo/pull/10158?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo/pull/10158?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [89863e0...c7ae4e5](https://codecov.io/gh/apache/dubbo/pull/10158?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] AlbumenJ merged pull request #10158: Optimization code

Posted by GitBox <gi...@apache.org>.
AlbumenJ merged PR #10158:
URL: https://github.com/apache/dubbo/pull/10158


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org