Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 80294 invoked from network); 29 Jun 2009 14:22:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Jun 2009 14:22:02 -0000 Received: (qmail 14434 invoked by uid 500); 29 Jun 2009 14:22:12 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 14396 invoked by uid 500); 29 Jun 2009 14:22:12 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 14354 invoked by uid 99); 29 Jun 2009 14:22:11 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jun 2009 14:22:11 +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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jun 2009 14:22:08 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 582A2234C053 for ; Mon, 29 Jun 2009 07:21:47 -0700 (PDT) Message-ID: <436538515.1246285307360.JavaMail.jira@brutus> Date: Mon, 29 Jun 2009 07:21:47 -0700 (PDT) From: "Dag H. Wanvik (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-2148) Debugging Derby 10.2.1.6 applications with Eclipse 3.1.2 is 10 times slower than debugging 10.1.2.2 applications In-Reply-To: <3114359.1165330763235.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2148?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dag H. Wanvik updated DERBY-2148: --------------------------------- Derby Categories: [Performance] > Debugging Derby 10.2.1.6 applications with Eclipse 3.1.2 is 10 times slower than debugging 10.1.2.2 applications > ---------------------------------------------------------------------------------------------------------------- > > Key: DERBY-2148 > URL: https://issues.apache.org/jira/browse/DERBY-2148 > Project: Derby > Issue Type: Sub-task > Affects Versions: 10.2.1.6 > Environment: Windows XP, Eclipse 3.1.2 and 3.2.1, Derby 10.2.1.6 and 10.1.2.2, JDK 1.4.2_10 > Reporter: Stefan Cordes > Priority: Minor > > When running an db-application with Derby 10.2 and eclipse 3.1.2 the CPU usage of the eclipse javaw consumes the major CPU power and so the application is slow. > Workaround: Take Eclipse 3.2.1 (where Derby 10.2 "debugs" only 50% slower) > The below code gives following results: > Runing mode: > Eclipse 3.1 with Derby 10.1: Inserts=8.000ms > Eclipse 3.1 with Derby 10.2: Inserts=6.000ms > Eclipse 3.2 with Derby 10.1: Inserts=6.000ms > Eclipse 3.2 with Derby 10.2: Inserts=6.000ms > (everything fine) > BUT Debugging mode: > Eclipse 3.1 with Derby 10.1: Inserts=20.000ms > Eclipse 3.1 with Derby 10.2: Inserts=229.000ms (<<<<) > Eclipse 3.2 with Derby 10.1: Inserts=20.000ms > Eclipse 3.2 with Derby 10.2: Inserts=30.000ms > Any known reason for that? > {code} > import java.io.File; > import java.sql.Connection; > import java.sql.DriverManager; > import java.sql.Statement; > import org.apache.derby.jdbc.EmbeddedDriver; > /** > * Test Speed on Derby Inserts > * > */ > public class SlowDerbyDebugTest { > public static void main(String[] args) { > try { > deleteFiles(new File("DB4O4")); > System.out.println("Classpath=" + System.getProperty("java.class.path")); > DriverManager.registerDriver(new EmbeddedDriver()); > Connection tempConnection = DriverManager.getConnection("jdbc:derby:DB4O4;create=true"); > tempConnection.setAutoCommit(false); > Statement tempStatement = tempConnection.createStatement(); > long tempStart = System.currentTimeMillis(); > tempStatement.executeUpdate("create table test (id bigint, value char(40), primary key(id))"); > long tempStop1 = System.currentTimeMillis(); > for (int i = 0; i < 1000; i++) { > tempStatement.executeUpdate("insert into test values (" + i + ",'" + i + "')"); > } > long tempStop2 = System.currentTimeMillis(); > tempConnection.commit(); > long tempStop3 = System.currentTimeMillis(); > System.out.println("Create Table=" + (tempStop1 - tempStart) + "ms Inserts=" + (tempStop2 - tempStop1) + "ms" > + " commit=" + (tempStop3 - tempStop2) + "ms Total=" + (tempStop3 - tempStart) + "ms"); > tempConnection.close(); > } catch (Exception e) { > e.printStackTrace(); > } > } > private static void deleteFiles(File tempDir) { > String[] tempFileNames = tempDir.list(); > if (tempFileNames != null) { > for (int i = 0; i < tempFileNames.length; i++) { > File tempDbFile = new File(tempDir.getAbsolutePath() + "/" + tempFileNames[i]); > if (tempDbFile.isDirectory()) { > deleteFiles(tempDbFile); > tempDbFile.delete(); > } else { > if (!tempDbFile.delete()) { > throw new RuntimeException("Cannot delete DB file '" + tempDbFile + "'."); > } > } > } > tempDir.delete(); > } > } > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.