Re: synchronized code

Поиск
Список
Период
Сортировка
От Michael Paesold
Тема Re: synchronized code
Дата
Msg-id 01ec01c2b762$2b6013b0$3201a8c0@beeblebrox
обсуждение исходный текст
Ответ на synchronized code  (Felipe Schnack <felipes@ritterdosreis.br>)
Список pgsql-jdbc
Felipe Schnack <felipes@ritterdosreis.br> wrote:

>   yuck! I think this implementation is kinda gross (can you send me this
> source? Just curious). Just imagine using preparedstatements, you will
> allocate a big internal buffer (to store the "PREPARE", etc command) and
> then just execute much smaller "EXECUTE" calls.

Well, I am really sorry, just re-read the code. I only fills the rest of the
StringBuffer with '\0' bytes, if the new length is _longer_ than the old. My
mistake. So setLength(0) is not expensive.
Btw. there is a src.zip in any j2sdk distribution that contains pretty much
all the java source code.

I would be very much interested in benchmarks with jdk 1.3, too.

Michael


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

Предыдущее
От: Oliver Jowett
Дата:
Сообщение: Re: synchronized code
Следующее
От: Joseph Shraibman
Дата:
Сообщение: Character Encoding WAS: ArrayIndexOutOfBoundsException in Encoding.decodeUTF8()