From: Luis Vilar Flores <lflores@evolute.pt>
To: pgsql-jdbc@postgresql.org
Subject: Re: bytea memory improvement
Date: Wed, 23 Aug 2006 15:48:05 +0100
Message-ID: <44EC6AA5.10205@evolute.pt> (raw)
In-Reply-To: <44EC66B0.2040108@kyon.de>
References: <44EB8C82.1000203@evolute.pt>
<44EC66B0.2040108@kyon.de>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
till toenges wrote:
<blockquote cite="mid44EC66B0.2040108@kyon.de" type="cite">
<pre wrap="">Luis Vilar Flores wrote:
</pre>
<blockquote type="cite">
<pre wrap=""> Hope to hear some feedback soon, hope I didn't forget anything ...
</pre>
</blockquote>
<pre wrap=""><!---->
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
</pre>
</blockquote>
The MAX_3_BUFF_SIZE can be deleted (and the test that use it too), it
was these so that we can set a size threshold to use 3 buffers (old
algorithm), or only 2 (at the beginning it seemed that 2 buffers were
slower).<br>
<br>
If the incoming size is 0 we can use the incoming array, I tried to
only change the buffer algorithm, the null case for instance was
already there.<br>
<br>
Thanks for the comments,<br>
<br>
<div class="moz-signature">-- <br>
<meta http-equiv="CONTENT-TYPE" content="text/html; ">
<title>Evolute - Luis Flores</title>
<p><font color="#7da647"><font face="Verdana, sans-serif"><font
style="font-size: 10pt;" size="2"> Luis Flores
</font></font></font></p>
<p>
<font color="#7da647"><font face="Verdana, sans-serif"><font
style="font-size: 8pt;" size="2"> Analista de Sistemas</font></font></font></p>
<p><a href="http://www.evolute.pt"><font face="Verdana, sans-serif"><font
style="font-size: 8pt;" size="2"><b>Evolute</b> - Consultoria
Informática<br>
<br>
</font></font></a>
<font color="#7da647"><font face="Verdana, sans-serif"><font
style="font-size: 8pt;" size="2"> Email: </font></font></font>
<a href="mailto:lflores@evolute.pt"><font face="Verdana, sans-serif"><font
style="font-size: 8pt;" size="2">lflores@evolute.pt
</font></font></a></p>
<p>
<font color="#7da647"><font face="Verdana, sans-serif"><font
style="font-size: 8pt;" size="2"> Tel: (+351)
212949689</font></font></font></p>
<div style="text-align: justify;"><font color="#7d7d7d"><font
face="Verdana, sans-serif"><font style="font-size: 7pt;" size="1">
<br>
AVISO DE CONFIDENCIALIDADE</font></font></font><br>
<font color="#7d7d7d"><font face="Verdana, sans-serif"><font
style="font-size: 7pt;" size="1">
Esta mensagem de correio electrónico e eventuais ficheiros
anexos são confidenciais e destinados apenas à(s)
pessoa(s) ou entidade(s) acima referida(s),
podendo conter informação privilegiada e
confidencial, a qual não poderá ser divulgada,
copiada, gravada ou distribuída nos termos da lei vigente.
Caso não
seja o destinatário da mensagem, ou se ela lhe foi enviada
por engano, agradecemos que não faça uso ou
divulgação da mesma. A
distribuição ou
utilização da informação
nela contida é interdita. Se recebeu esta mensagem por
engano, por favor notifique o remetente e apague este e-mail do seu
sistema.
Obrigado.
<br>
</font></font></font><font color="#7d7d7d"><font
face="Verdana, sans-serif"><font style="font-size: 7pt;" size="1">
</font></font></font><br>
<font color="#7d7d7d"><font face="Verdana, sans-serif"><font
style="font-size: 7pt;" size="1">
CONFIDENTIALITY NOTICE</font></font></font><br>
<font color="#7d7d7d"><font face="Verdana, sans-serif"><font
style="font-size: 7pt;" size="1">
This e-mail transmission and eventual attached files are intended only
for the use of the individual(s) or entity(ies) named above and may
contain
information that is both privileged and confidential and is exempt from
disclosure under applicable law. If you are not the intended recipient,
you are
hereby notified that any disclosure, copying, distribution or use of
any of the information contained in this transmission is strictly
restricted. If by any
means you have received this transmission in error, please immediately
notify the sender and delete this e-mail from your system. Thank you.
</font></font></font></div>
</div>
</body>
</html>
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: lflores@evolute.pt
Subject: Re: bytea memory improvement
In-Reply-To: <44EC6AA5.10205@evolute.pt>
References: <44EB8C82.1000203@evolute.pt> <44EC66B0.2040108@kyon.de> <44EC6AA5.10205@evolute.pt>
* 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