CLOUDSTACK-8919: Slow UI response while loading the list of networks in network tab.#897
Conversation
|
cloudstack-pull-rats #766 SUCCESS |
|
cloudstack-pull-analysis #718 SUCCESS |
|
thanks @nitin-maharana maybe we should have a small performance study to show that it actually speeds things up |
|
LGTM (reviewed the changes, did not test it though) |
|
@nitin-maharana I looked at this, seems good. What is the best way to test this or see the difference? |
|
@remibergsma @Runseb Clicking 'Network' tab invokes 3 api as mentioned below. http://localhost:8080/client/api?command=listZones&response=json&sessionkey=1ddeSxQjc604bdnHJegYqkM6EgA%3D&networktype=Advanced&_=1436356355027 -- 371ms http://localhost:8080/client/api?command=listNetworks&response=json&sessionkey=1ddeSxQjc604bdnHJegYqkM6EgA%3D&supportedServices=SecurityGroup&listAll=true&details=min&_=1436356355424 -- 18.97s http://localhost:8080/client/api?command=listNetworks&response=json&sessionkey=1ddeSxQjc604bdnHJegYqkM6EgA%3D&listAll=true&page=1&pagesize=20&_=1436356374437 -- 1.54s Second API call is taking 90% of the total response time.This api fetches all networks and interates over each network and for each network it makes an db call to fetch the services associated with the network. This is an expensive operation. Solution: total : 1.19s |
|
Thanks @sudhansu7. I had also the similar idea. @remibergsma @Runseb please look at the comments of sudhansu. Thanks. |
bee8e87 to
e8c4b2b
Compare
…in network tab. Instead of searching for each network, now it is searching for each zone. For basic zone, it will show the security group directly because by default securitygroupsenabled is true. For advanced zone, check the securitygroupsenabled option in each zone. If any one has value true, then show.
|
manually verified the fix.
After the fix:
though I didnt see any performance improvement in my simple setup with 2 networks, the change is working fine and didnt see any issues because of it. 👍 LGTM |
|
@remibergsma 2 LGTM's so it can be merged at your discretion. |
|
This PR has a conflict now, can someone resolve it? |
|
Hi @remibergsma, I tried rebasing with current master. There is no conflict as such. I think you were trying to merge the PR #987, But this PR is #897. Thanks. |
|
Hi @nitin-maharana hmm all those numbers ;-) sorry dude! |
CLOUDSTACK-8919: Slow UI response while loading the list of networks in network tab.Instead of searching for each network, now it is searching for each zone. For basic zone, it will show the security group directly because by default securitygroupsenabled is true. For advanced zone, check the securitygroupsenabled option in each zone. If any one has value true, then show. * pr/897: CLOUDSTACK-8919: Slow UI response while loading the list of networks in network tab. Signed-off-by: Remi Bergsma <github@remi.nl>
label: label.zonewizard.traffictype.management Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>

Instead of searching for each network, now it is searching for each zone.
For basic zone, it will show the security group directly because by default securitygroupsenabled is true.
For advanced zone, check the securitygroupsenabled option in each zone. If any one has value true, then show.