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 5AB0D18D54 for ; Fri, 1 Apr 2016 02:25:40 +0000 (UTC) Received: (qmail 61285 invoked by uid 500); 1 Apr 2016 02:25:40 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 61214 invoked by uid 500); 1 Apr 2016 02:25:40 -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 60924 invoked by uid 99); 1 Apr 2016 02:25:39 -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; Fri, 01 Apr 2016 02:25:39 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id A85C4E057C; Fri, 1 Apr 2016 02:25:39 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: swill@apache.org To: commits@cloudstack.apache.org Date: Fri, 01 Apr 2016 02:25:42 -0000 Message-Id: <032561f7f1214b3f81a882f320eeb5e0@git.apache.org> In-Reply-To: <662d8082c2bb4071bdd8427d28a16808@git.apache.org> References: <662d8082c2bb4071bdd8427d28a16808@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [4/4] git commit: updated refs/heads/master to 419f8fb 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/master 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(-) ----------------------------------------------------------------------