Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 601371337B97 for ; Sun, 24 Apr 2011 23:22:03 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 30658-03 for ; Mon, 25 Apr 2011 02:21:45 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by mail.postgresql.org (Postfix) with ESMTP id 0DF1C133655C for ; Sun, 24 Apr 2011 23:21:44 -0300 (ADT) Received: from mail63.csoft.net (localhost [127.0.0.1]) by mail63.csoft.net (Postfix) with ESMTP id 0B1C02840E; Sun, 24 Apr 2011 22:21:44 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=csoft.net; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sel1; bh=OXQ2DwfFNtfFDdXyYxX9FxIRcpI=; b=Lo9Qeq +BhQZkjV7T+kqH+tFD+sMNqzAMYiN7Yf2ZBwAUb12Yky0sGtXI99IMOLy7e3c2Mz PbZIXNRPSy5xnQU+P7qOEQlJLldOloofYPu3HjiLSH9CmkyX/kokPlXx9W6RX6eK 3zjm0IdCp1rgM0YIXMwqFa2KFQNZKIs7PkmZc= Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id E13652840A; Sun, 24 Apr 2011 22:21:43 -0400 (EDT) Received: by leary.csoft.net (Postfix, from userid 1112) id 960B2A26F; Sun, 24 Apr 2011 22:21:43 -0400 (EDT) Date: Sun, 24 Apr 2011 22:21:43 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Daniel Migowski cc: "pgsql-jdbc@postgresql.org" Subject: Re: Unnessecary use of new Integer(n) in AbstractJdbc2ResultSet In-Reply-To: <41ED3F5450C90F4D8381BC4D8DF6BBDC4F095AFD@EXCHANGESERVER.ikoffice.de> Message-ID: References: <41ED3F5450C90F4D8381BC4D8DF6BBDC4F095AFD@EXCHANGESERVER.ikoffice.de> User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/85 X-Sequence-Number: 21811 On Sat, 23 Apr 2011, Daniel Migowski wrote: > I am using the postgresql driver 8.3-604-jdbc3, and noticed something > strange in my profiling reports: > > In Line 2518 of AbstractJdbc2ResultSet, in function findColumnIndex, there > is a call to "new Integer(n)", which takes 2% overall time in my app! It > should be replaced by "Integer.valueOf(n)", because this doesn't create any > new instances on Integer for the usecase found here! > Integer.valueOf appeared in JDK 1.5 and we currently still support JDK 1.4. There's been talk of ditching 1.4 support, but that hasn't officially happened yet and isn't something we'd do for older driver releases. Kris Jurka