Re: Performance tweaks

Поиск
Список
Период
Сортировка
От Ken Geis
Тема Re: Performance tweaks
Дата
Msg-id 421BC4F7.6040704@speakeasy.net
обсуждение исходный текст
Ответ на Re: Performance tweaks  (Oliver Jowett <oliver@opencloud.com>)
Список pgsql-jdbc
Oliver Jowett wrote:
> Ken Geis wrote:
>
>> First, in PGStream, I "unrolled" SendInteger4 and SendInteger2, like
>> this:
>>
>>     private static final byte[] B4 = new byte[4];
>>     public void SendInteger4(int val) throws IOException
>>     {
>>         B4[0] = (byte) ((val >> 24)&255);
>>         B4[1] = (byte) ((val >> 16)&255);
>>         B4[2] = (byte) ((val >> 8)&255);
>>         B4[3] = (byte) (val&255);
>>         pg_output.write(B4, 0, 4);
>>     }
>
>
> This isn't safe across multiple PGStreams. Can you try benchmarking
> again with "private final" instead of "private static final"? If that's
> still a win it is probably worth changing.

I missed that glaringly obvious point!

My computer is tied up right now in a computational task.  I'll get back
to you tomorrow.


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: PostGreSQL and Crystal Reports Bug?
Следующее
От: Ken Geis
Дата:
Сообщение: Re: Performance tweaks