Return-Path: Delivered-To: apmail-continuum-commits-archive@www.apache.org Received: (qmail 79005 invoked from network); 6 Oct 2009 05:53:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Oct 2009 05:53:48 -0000 Received: (qmail 43486 invoked by uid 500); 6 Oct 2009 05:53:48 -0000 Delivered-To: apmail-continuum-commits-archive@continuum.apache.org Received: (qmail 43438 invoked by uid 500); 6 Oct 2009 05:53:48 -0000 Mailing-List: contact commits-help@continuum.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@continuum.apache.org Delivered-To: mailing list commits@continuum.apache.org Received: (qmail 43427 invoked by uid 99); 6 Oct 2009 05:53:48 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Oct 2009 05:53:48 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Oct 2009 05:53:38 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 89EB323888E3; Tue, 6 Oct 2009 05:52:47 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r822134 - /continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Date: Tue, 06 Oct 2009 05:52:47 -0000 To: commits@continuum.apache.org From: ctan@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091006055247.89EB323888E3@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ctan Date: Tue Oct 6 05:52:47 2009 New Revision: 822134 URL: http://svn.apache.org/viewvc?rev=822134&view=rev Log: [CONTINUUM-1031] use getBuildResultsForProject instead of getProjectWithBuilds to improve performance when deleting a project Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=822134&r1=822133&r2=822134&view=diff ============================================================================== --- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java (original) +++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Tue Oct 6 05:52:47 2009 @@ -591,7 +591,7 @@ { try { - Project project = getProjectWithBuilds( projectId ); + Project project = getProject( projectId ); try { @@ -660,9 +660,10 @@ log.info( "Remove project " + project.getName() + "(" + projectId + ")" ); - for ( Object o : project.getBuildResults() ) + Collection buildResults = getBuildResultsForProject( projectId ); + + for ( BuildResult br : buildResults ) { - BuildResult br = (BuildResult) o; br.setBuildDefinition( null ); //Remove all modified dependencies to prevent SQL errors br.setModifiedDependencies( null );