dubbo
dubbo copied to clipboard
[Bug] RandomLoadBalance optimize the same weight judgement
Pre-check
- [X] I am sure that all the content I provide is in English.
Search before asking
- [X] I had searched in the issues and found no similar issues.
Apache Dubbo Component
Java SDK (apache/dubbo)
Dubbo Version
Dubbo java 3.2, Open-JDK 1.8, Windows
Steps to reproduce this issue
we judge if the weight is same after accumulation. It will cause us to do an additional addition operation. We can move the logic to determine if the weights are the same before accumulation. So we can reduce addition operation.
What you expected to happen
We don't need to do an additional operation. It reduces performance
Anything else
No response
Are you willing to submit a pull request to fix on your own?
- [X] Yes I am willing to submit a pull request on my own!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct