Re: Re: JDBC Performance

From: Peter Mount <peter(at)retep(dot)org(dot)uk>
To: Gunnar R|nning <gunnar(at)candleweb(dot)no>
Cc: kientzle(at)acm(dot)org, PostgreSQL general mailing list <pgsql-general(at)postgresql(dot)org>, "Keith L(dot) Musser" <kmusser(at)idisys(dot)com>
Subject: Re: Re: JDBC Performance
Date: 2000-10-02 10:45:55
Message-ID: Pine.LNX.4.21.0010021136080.420-100000@maidast.demon.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 29 Sep 2000, Gunnar R|nning wrote:

> Peter Mount <peter(at)retep(dot)org(dot)uk> writes:
>
> >
> > Email them to me, as the modifications will break when I commit my changes
> > (delayed due to stress related illness), and there's a lot of changes in
> > there. I'm about to resume work in a few minutes.
> >
>
> Okay, I wrapped up the modifications now. I'm appending the patch against
> the current CVS. You can also find the patch and a precompiled version of
> the driver at :
>
> http://www.candleweb.no/~gunnar/projects/pgsql/

Ok, got it.

[snip]

> The interesting part is the replacement of new byte[] with an allocByte()
> method called that uses a pool of different byte arrays. I first tried
> using the JDK 1.2 datastructures to implement the pooling, but they had too
> much overhead so I created a couple of simple and dirty implementations
> instead.

Also, they wouldn't have worked for 1.1.x JVM's. If we can do it
ourselves, we can still support the earlier specs.

> I also added ReceiveString() methods that can take byte[] array as
> parameter. All the ReceiveString methods in Connection now uses one shared
> byte array instead of forcing ReceiveString to allocate a new one on each
> call.

There shouldn't be any problems with this, as all calls to those methods
are locked against pg_Stream. The multi-thread test should prove this.

> Comments and test results from others are very welcome.
>
> Maybe I will look into doing the custom char conversion this weekend, as
> the default implementation provided by Sun appears to be the current
> bottleneck. As Tim Kientzle wrote in another mail, this implementation is
> instatiating a new converter object every time you do a conversion. This is
> is also pointed out has a bottleneck by OptimizeIT.

Yes, I didn't know about that one before Tim brought it up. Like the
byte[] stuff, if we can remove as many of these as possible, then we would
improve the performance immensely.

I'm now off work for the next two weeks (off sick that is), so I'll have
some more time now to get the driver up to date. I'm finishing off the
outstanding stuff now, so this should be in CVS today (finally ;-) )

Peter

--
Peter T Mount peter(at)retep(dot)org(dot)uk http://www.retep.org.uk
PostgreSQL JDBC Driver http://www.retep.org.uk/postgres/
Java PDF Generator http://www.retep.org.uk/pdf/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Peter Mount 2000-10-02 10:50:10 Re: Re: JDBC Performance
Previous Message Erno Kuusela 2000-10-02 09:40:11 Change/convert encoding?