From: | Luis Vilar Flores <lflores(at)evolute(dot)pt> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: bytea memory improvement |
Date: | 2006-08-23 14:48:05 |
Message-ID: | 44EC6AA5.10205@evolute.pt |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
<!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(dot)2040108(at)kyon(dot)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(at)evolute(dot)pt"><font face="Verdana, sans-serif"><font
style="font-size: 8pt;" size="2">lflores(at)evolute(dot)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>
Attachment | Content-Type | Size |
---|---|---|
unknown_filename | text/html | 4.4 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Rich Rutkowski | 2006-08-23 16:51:49 | XA Resources |
Previous Message | till toenges | 2006-08-23 14:31:12 | Re: bytea memory improvement |