On Tue, 27 Feb 2007, Stephen Denne wrote:
> I had a different implementation in mind for Send(byte buf, int off,
> int siz) along the lines of:
I'm not convinced this will be significantly faster, but it is slightly
clearer, so I've incorporated it.
> Is there a reason for removing pg_input.ensureBytes(siz)? I see you're
> checking the length of what was read instead. Is this always equivalent
> or sufficient? Does it block in diferent ways?
Internally VisibleBufferedInputStream will end up calling ensureBytes in
the read call. I don't think the actual read length check is necessary,
but it's the sort of thing that could easily break if we changed the
> When converting ints to bytes, you do not need to mask with 255 (see
> int0 to int3 in java.nio.Bits).
> Is it possible other people have code that is calling
> ReceiveIntegerR(int siz)?
No, PGStream is an internal only class.
In response to
pgsql-jdbc by date
|Next:||From: Kris Jurka||Date: 2007-02-28 06:14:29|
|Subject: Re: Minor performance improvements|
|Previous:||From: Kris Jurka||Date: 2007-02-27 15:30:43|
|Subject: Re: postgresql 7.4 driver for java 5|