weizhouapache commented on code in PR #9470:
URL: https://github.com/apache/cloudstack/pull/9470#discussion_r1701838400


##########
server/src/main/java/com/cloud/api/ApiResponseHelper.java:
##########
@@ -2719,6 +2750,29 @@ public NetworkResponse 
createNetworkResponse(ResponseView view, Network network)
         response.setBytesReceived(bytesReceived);
         response.setBytesSent(bytesSent);
 
+        if 
(networkOfferingDao.isRoutedNetwork(network.getNetworkOfferingId())) {

Review Comment:
   @shwstppr 
   indeed this could be optimized.
   
   However, this is consistent as what the ipv6routes are set.
   also, in almost all users's environments, there are very few (less than 100) 
network offerings, as numbers and bgp peers (user_ip_address table might be 
big), so it may be not a major issue if there are lots of networks.
   
   The most time of listnetworks API occurs in the query of `networks` table 
which could be very big for long-running environments, not in the creation of 
response (except `user_statistics` table which could be big).
   



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