GutoVeronezi opened a new pull request, #7617:
URL: https://github.com/apache/cloudstack/pull/7617

   ### Description
   
   The user's dashboard presents the user's amount of running VMs, stopped VMs, 
total VMs, volumes, networks, and public IP addresses. The APIs 
`listVirtualMachines`, `listVolumes`, `listNetworks`, and 
`listPublicIpAddresses` process and return the whole data, which can be slow 
when dealing with a great number of resources. However, for the user's 
dashboard context, we just need the count of resources.
   
   This PR intends to create a new parameter (`retrieveonlyresourcecount`) in 
those APIs to skip the data processing and return only the resource count.
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Bug fix (non-breaking change which fixes an issue)
   - [x] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [x] Minor
   
   ### Screenshots (if appropriate):
   
   ### How Has This Been Tested?
   
   I created several VMs in my environment, logged in with a domain admin, and 
observed how much time the dashboard was taking to completely load. Before the 
changes, it was taking more than 30 seconds to load and the time would increase 
according to the amount of resources:
   
   
![before](https://github.com/apache/cloudstack/assets/38945620/5b58b8b3-405c-417c-9bc8-ad01bd7144f0)
   
   
![image](https://github.com/apache/cloudstack/assets/38945620/ba834c3f-bdc9-4fd2-8234-53ecdc27a04e)
   
   
   With the changes it is taking around 2 seconds to completely load:
   
   
![after](https://github.com/apache/cloudstack/assets/38945620/1cf7ddf3-ddc2-45c0-a4ac-f0c9df4f424d)
   
   
![image](https://github.com/apache/cloudstack/assets/38945620/c329c6aa-c0d9-4400-b1d7-b455776c4910)
   
   
   
   


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