pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Hallgren <thhal@mailblocks.com>
To: Oliver Jowett <oliver@opencloud.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: [HACKERS] Binary Cursors, and the COPY command
Date: Tue, 27 Jul 2004 14:58:36 +0200
Message-ID: <thhal-0SOvhAV2AUNsrD1b21bnUVdXao4af1P@mailblocks.com> (raw)
In-Reply-To: <41063FFE.8030400@opencloud.com>
References: <10519.64.119.142.34.1090863707.squirrel@mail.mohawksoft.com>
	<410574F9.9020103@opencloud.com>
	<ce4t7l$pas$2@sea.gmane.org>
	<4105FF43.40508@opencloud.com>
	<ce587j$ga1$1@sea.gmane.org>
	<410628B9.2080800@opencloud.com>
	<41063C77.6050305@mailblocks.com>
	<thhal-0Q9bhAYV/UNsnPJAzxj6lUGXE5P7Ium@mailblocks.com>
	<41063FFE.8030400@opencloud.com>
	<4106517C.2090802@mailblocks.com>
	<thhal-0R+vhAVuAUNsmTOeWEFk4eWMUjvkd03@mailblocks.com>

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





view thread (15+ messages)  latest in thread

Message-ID: <thhal-0SOvhAV2AUNsrD1b21bnUVdXao4af1P@mailblocks.com>
Permalink:  ../thhal-0SOvhAV2AUNsrD1b21bnUVdXao4af1P@mailblocks.com/
Also on:    postgresql.org/message-id/thhal-0SOvhAV2AUNsrD1b21bnUVdXao4af1P@mailblocks.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: thhal@mailblocks.com, oliver@opencloud.com
  Subject: Re: [HACKERS] Binary Cursors, and the COPY command
  In-Reply-To: <thhal-0SOvhAV2AUNsrD1b21bnUVdXao4af1P@mailblocks.com>
  References: <10519.64.119.142.34.1090863707.squirrel@mail.mohawksoft.com> <410574F9.9020103@opencloud.com> <ce4t7l$pas$2@sea.gmane.org> <4105FF43.40508@opencloud.com> <ce587j$ga1$1@sea.gmane.org> <410628B9.2080800@opencloud.com> <41063C77.6050305@mailblocks.com> <thhal-0Q9bhAYV/UNsnPJAzxj6lUGXE5P7Ium@mailblocks.com> <41063FFE.8030400@opencloud.com> <4106517C.2090802@mailblocks.com> <thhal-0R+vhAVuAUNsmTOeWEFk4eWMUjvkd03@mailblocks.com> <thhal-0SOvhAV2AUNsrD1b21bnUVdXao4af1P@mailblocks.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox