Re: bytea memory improvement - Mailing list pgsql-jdbc

From till toenges
Subject Re: bytea memory improvement
Date
Msg-id 44EC66B0.2040108@kyon.de
Whole thread Raw
In response to Re: bytea memory improvement  (Luis Vilar Flores <lflores@evolute.pt>)
Responses Re: bytea memory improvement
List pgsql-jdbc
Luis Vilar Flores wrote:
>     Hope to hear some feedback soon, hope I didn't forget anything ...

I have an idea for a minor improvement. The MAX_3_BUFF_SIZE is set to 0.
Actually, you can immediately return an empty byte array if the size of
the incomming buffer is 0; that could be a static final byte[], because
nobody could do anything with it anyway. In all other cases, the 2
buffer method is simpler and faster, because it uses fewer buffers and
memory accesses, and is therefore the right solution.


Till


pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: org.postgresql.util.PSQLException: An I/O error occured
Next
From: Luis Vilar Flores
Date:
Subject: Re: bytea memory improvement