ustcweizhou commented on issue #3178: GUI project pulldown list slowdown on large number of projects URL: https://github.com/apache/cloudstack/issues/3178#issuecomment-464102586 We had similar issue on listing vms if vms have several tags. We fixed it by recreating view without resource tag, and get resource tags by a query in server/src/com/cloud/api/query/dao/UserVmJoinDaoImpl.java. ``` // update tag information - long tag_id = userVm.getTagId(); - if (tag_id > 0 && !userVmResponse.containTag(tag_id)) { - ResourceTagJoinVO vtag = ApiDBUtils.findResourceTagViewById(tag_id); - if (vtag != null) { - userVmResponse.addTag(ApiDBUtils.newResourceTagResponse(vtag, false)); - } + List<ResourceTagJoinVO> tags = ApiDBUtils.listResourceTagViewByResourceUUID(userVm.getUuid(), ResourceObjectT +ype.UserVm); + for (ResourceTagJoinVO vtag : tags) { + userVmResponse.addTag(ApiDBUtils.newResourceTagResponse(vtag, false)); } @@ -406,14 +404,6 @@ public class UserVmJoinDaoImpl extends GenericDaoBase<UserVmJoinVO, Long> implem userVmData.addNic(nicResponse); } - long tag_id = uvo.getTagId(); - if (tag_id > 0 && !userVmData.containTag(tag_id)) { - ResourceTagJoinVO vtag = ApiDBUtils.findResourceTagViewById(tag_id); - if (vtag != null) { - userVmData.addTag(ApiDBUtils.newResourceTagResponse(vtag, false)); - } - } - ``` it would be better to remove resource tags from all views because it leads to too many records in views.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services