singleo0 commented on code in PR #4747:
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/4747#discussion_r2083723562


##########
foundations/foundation-registry/src/main/java/org/apache/servicecomb/registry/consumer/MicroserviceVersions.java:
##########
@@ -148,6 +148,10 @@ public List<MicroserviceInstance> getPulledInstances() {
     return pulledInstances;
   }
 
+  public List<MicroserviceInstance> getInstances() {
+    return new ArrayList<MicroserviceInstance>(instances);

Review Comment:
   > In addition, the ping timertask in `ServiceCombLoadBalancerStats` invokes 
`microserviceVersions.getInstances()` for every single server, causing too much 
temporary list. See the modification on 
[ServiceCombLoadBalancerStats.java](https://github.com/apache/servicecomb-java-chassis/pull/4747/files#diff-18d8609493c7f4e0d147a9509339147d3019b871bfad9d48625d524b3404d282)
 in this PR.
   
   maybe we can load the instance list once in a cycle ?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to