Re: bytea memory improvement

From: till toenges <tt(at)kyon(dot)de>
To: Luis Vilar Flores <lflores(at)evolute(dot)pt>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: bytea memory improvement
Date: 2006-08-23 14:31:12
Message-ID: 44EC66B0.2040108@kyon.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Luis Vilar Flores 2006-08-23 14:48:05 Re: bytea memory improvement
Previous Message Oliver Jowett 2006-08-23 06:33:16 Re: [JDBC] org.postgresql.util.PSQLException: An I/O error occured