In your case 1:
Invoking currentSelect-method 1M times lead to 1833832000 times calc, cause:
```
for (int i = 0; i < maxWeight; i++) { // this is the reason
     for (Map.Entry<Integer, IntegerWrapper> each : 
invokerToWeightMap.entrySet()) {
                    ....
     }
}
```

If we modify the weight array to {100, 100, 200, 200, 300, 300, 400, 400, 500, 
50000};
It need 900s to finish it.

So we must optimize this RR algorithm.

[ Full content available at: 
https://github.com/apache/incubator-dubbo/issues/2578 ]
This message was relayed via gitbox.apache.org for 
[email protected]

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to