X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 92FFFD1B508 for ; Tue, 27 Jul 2004 10:04:11 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 88671-10 for ; Tue, 27 Jul 2004 13:04:08 +0000 (GMT) Received: from smtp3.mailblocks.com (smtp3.mailblocks.com [140.174.9.93]) by svr1.postgresql.org (Postfix) with SMTP id B28D8D1B4FA for ; Tue, 27 Jul 2004 10:04:04 -0300 (ADT) Received: (qmail 15305 invoked from network); 27 Jul 2004 13:04:08 -0000 Received: from 10.10.0.51 (HELO mailblocks.com) (10.10.0.51) by 10.10.0.93 with SMTP; 27 Jul 2004 13:04:08 -0000 MIME-Version: 1.0 To: Oliver Jowett Cc: pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=us-ascii; format=flowed References: <10519.64.119.142.34.1090863707.squirrel@mail.mohawksoft.com> <410574F9.9020103@opencloud.com> <4105FF43.40508@opencloud.com> <410628B9.2080800@opencloud.com> <41063C77.6050305@mailblocks.com> <41063FFE.8030400@opencloud.com> <4106517C.2090802@mailblocks.com> X-Accept-Language: en-us, en Content-Transfer-Encoding: 7bit Subject: Re: [HACKERS] Binary Cursors, and the COPY command X-MB-Message-Source: ClientSMTP Received: from 212.209.14.34 by app2.mailblocks.com (192.168.225.51) with SMTP (authenticated); Tue, 27 Jul 2004 06:04:07 -0700 X-MB-Message-Type: User Message-Id: From: Thomas Hallgren In-Reply-To: <41063FFE.8030400@opencloud.com> Date: Tue, 27 Jul 2004 14:58:36 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200407/307 X-Sequence-Number: 10691 Oliver Jowett wrote: > I haven't seen the string manipulation to be much of a problem with > the current driver in the profiling I've done (it'll be quite > application specific though). And I'd have thought the stringbuffer > monitors would be essentially uncontended and cheap to enter. What are > the hotspots you see? > See below... > Also I am fairly suspicious about claims that native byte order will > make things go measurably faster. Do you have any profiling or > benchmarks to back that up? The low-level manipulation of protocol > data barely shows up on the profiles I've done. I haven't made any benchmarks and I admit that as long as the client and server runs in separate processes, the gain will be relatively small. Context switching and socket management are the real time consumers. I'm the author of PL/Java. It uses its own JDBC driver on top of SPI. The main reason for thas is that I don't want the overhead of streaming data and flipping byte order when everything is readily available in memory. When "client" and "server" resides in the same process the overhead is measurable. By using java.nio in your JDBC, I beleive it would be possible to not just use native byte ordering, but perhaps also to create a nice abstraction allowing direct access to structures in memory rather than streaming data, thus obliviate the need for my own driver. And PL/Java will never run on Java 1.3 or older :-) Do you have any opinion on that? Regards, Thomas Hallgren