Re: ps.setCharacterStream() and memory usage

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: ps.setCharacterStream() and memory usage
Дата
Msg-id 4187E3E7.9080507@opencloud.com
обсуждение исходный текст
Ответ на Re: ps.setCharacterStream() and memory usage  (Sebastiaan van Erk <sebster@sebster.com>)
Список pgsql-jdbc
Sebastiaan van Erk wrote:

> This is indeed part of the code I was talking about. And indeed a
> StringBuffer is already a definate improvement.
>
> However, the setString() method will also cause the data to be duplicated
> when escapeString() is called. A version of escapeString() which works
> on a StringBuffer would be another improvement in my opinion, saving
> (if the allocated StringBuffer is made a bit larger to allow for the
> escaping), in most cases another allocation of the whole string.

I would point out again that this is all different in the current
development driver. escapeString() no longer exists, and the V3 protocol
path does not do any additional string escaping as the string is passed
directly as a parameter in a Bind message.

There's still much scope for improvement, but I'd strongly suggest you
use the development driver as a starting point.

-O

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

Предыдущее
От: Vadim Nasardinov
Дата:
Сообщение: 1300 to 3100 lines of code for XA support (was: Re: plans and estimates for supporting JDBC 3.0)
Следующее
От: Oliver Jowett
Дата:
Сообщение: Re: 1300 to 3100 lines of code for XA support