apache/dubbo

[Discussion] RandomLoadBalance optimize the same weight judgement

Open

#13,948 创建于 2024年3月19日

在 GitHub 查看
 (1 评论) (0 反应) (0 负责人)Java (26,453 fork)batch import
component/sdkhelp wantedtype/discussiontype/enhancement

仓库指标

Star
 (41,524 star)
PR 合并指标
 (平均合并 7天 14小时) (30 天内合并 20 个 PR)

描述

Pre-check

  • I am sure that all the content I provide is in English.

Search before asking

  • 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?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

贡献者指南