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

Cache the parsed result of the HelpCommand and HelpTelnetHandler #7919

Merged
merged 2 commits into from
Jun 1, 2021

Conversation

BurningCN
Copy link
Member

What is the purpose of the change

Cache the parsed result of the HelpCommand and HelpTelnetHandler to avoid repeated parsing and processing

@codecov-commenter
Copy link

codecov-commenter commented May 30, 2021

Codecov Report

Merging #7919 (e3a2d04) into master (e845e16) will increase coverage by 1.18%.
The diff coverage is 76.66%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #7919      +/-   ##
============================================
+ Coverage     59.28%   60.46%   +1.18%     
- Complexity      529      545      +16     
============================================
  Files          1077     1089      +12     
  Lines         43565    43849     +284     
  Branches       6368     6403      +35     
============================================
+ Hits          25826    26514     +688     
+ Misses        14879    14363     -516     
- Partials       2860     2972     +112     
Impacted Files Coverage Δ
...ting/telnet/support/command/HelpTelnetHandler.java 77.41% <74.07%> (+2.41%) ⬆️
...n/java/org/apache/dubbo/qos/command/impl/Help.java 83.33% <100.00%> (+0.57%) ⬆️
.../dubbo/remoting/transport/MultiMessageHandler.java 80.00% <0.00%> (-20.00%) ⬇️
...bo/rpc/cluster/support/FailbackClusterInvoker.java 52.45% <0.00%> (-18.04%) ⬇️
...in/java/org/apache/dubbo/common/utils/JVMUtil.java 81.13% <0.00%> (-11.33%) ⬇️
...o/remoting/transport/ChannelHandlerDispatcher.java 60.00% <0.00%> (-10.00%) ⬇️
...ting/exchange/support/header/HeartbeatHandler.java 83.72% <0.00%> (-9.31%) ⬇️
...va/org/apache/dubbo/rpc/support/ProtocolUtils.java 61.53% <0.00%> (-8.03%) ⬇️
...bbo/config/bootstrap/builders/ConsumerBuilder.java 93.10% <0.00%> (-6.90%) ⬇️
...apache/dubbo/rpc/cluster/support/ClusterUtils.java 60.00% <0.00%> (-6.04%) ⬇️
... and 133 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 e845e16...e3a2d04. Read the comment docs.

@AlbumenJ
Copy link
Member

Would it be better to change to WeakReference?

@BurningCN
Copy link
Member Author

Would it be better to change to WeakReference?

Thank you for your suggestion. The help command is less important than others. I have modified the map type to WeakHashMap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants