Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6CF0F18078 for ; Mon, 4 Apr 2016 06:27:55 +0000 (UTC) Received: (qmail 77158 invoked by uid 500); 4 Apr 2016 06:27:54 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 77075 invoked by uid 500); 4 Apr 2016 06:27:54 -0000 Mailing-List: contact commits-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list commits@cloudstack.apache.org Received: (qmail 76443 invoked by uid 99); 4 Apr 2016 06:27:54 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Apr 2016 06:27:54 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9ED97E0663; Mon, 4 Apr 2016 06:27:53 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bhaisaab@apache.org To: commits@cloudstack.apache.org Date: Mon, 04 Apr 2016 06:27:58 -0000 Message-Id: <64f0095ed9a741d5acdf83ae7017d55d@git.apache.org> In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [06/15] git commit: updated refs/heads/4.9-mvn-upgrade to 4c10aff Merge pull request #1425 from nvazquez/listtemplates CLOUDSTACK-9298: Improve performance of resource retrieval that have tags associated and target volumes, VMs and templatesJIRA TICKET: https://issues.apache.org/jira/browse/CLOUDSTACK-9298 ## Description of the problem When retrieving a large number of resources which have tags associated with, retrieval methods took too long. Our goal is to improve performance of this methods avoiding query the database for each tag, managing that information in memory. API methods to improve: listTemplates, listVolumes, listVirtualMachines To achive it, it's necessary to include new columns in template_view, volume_view and user_vm_view: * tag_account_name * tag_domain_name * tag_domain_uuid * pr/1425: CLOUDSTACK-9298: Remove user definer from view creations CLOUDSTACK-9298: Add @MappedSuperClass support for persistence inheritance CLOUDSTACK-9298: Improve ListTemplatesCmd, ListVolumesCmd and ListVMsCmd performance Signed-off-by: Will Stevens Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/419f8fba Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/419f8fba Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/419f8fba Branch: refs/heads/4.9-mvn-upgrade Commit: 419f8fba63f1fbd46a05d717a9354aad842d6a20 Parents: 2456500 c19d8b4 Author: Will Stevens Authored: Thu Mar 31 22:24:36 2016 -0400 Committer: Will Stevens Committed: Thu Mar 31 22:24:36 2016 -0400 ---------------------------------------------------------------------- .../api/BaseResponseWithTagInformation.java | 40 ++ .../api/response/ResourceTagResponse.java | 4 + .../api/response/TemplateResponse.java | 13 +- .../cloudstack/api/response/UserVmResponse.java | 16 +- .../cloudstack/api/response/VolumeResponse.java | 20 +- .../db/src/com/cloud/utils/db/SqlGenerator.java | 11 + .../dao/GenericDaoBaseWithTagInformation.java | 51 +++ .../api/query/dao/TemplateJoinDaoImpl.java | 13 +- .../cloud/api/query/dao/UserVmJoinDaoImpl.java | 14 +- .../cloud/api/query/dao/VolumeJoinDaoImpl.java | 14 +- .../query/vo/BaseViewWithTagInformationVO.java | 183 +++++++++ .../cloud/api/query/vo/ResourceTagJoinVO.java | 52 +++ .../com/cloud/api/query/vo/TemplateJoinVO.java | 89 +---- .../com/cloud/api/query/vo/UserVmJoinVO.java | 84 +--- .../com/cloud/api/query/vo/VolumeJoinVO.java | 85 +--- ...enericDaoBaseWithTagInformationBaseTest.java | 90 +++++ .../api/query/dao/TemplateJoinDaoImplTest.java | 50 +++ .../api/query/dao/UserVmJoinDaoImplTest.java | 50 +++ .../api/query/dao/VolumeJoinDaoImplTest.java | 50 +++ setup/db/db/schema-481to490.sql | 389 +++++++++++++++++++ 20 files changed, 1003 insertions(+), 315 deletions(-) ----------------------------------------------------------------------