Re: RE: [ADMIN] High memory usage [PATCH]

Поиск
Список
Период
Сортировка
От Gunnar Rønning
Тема Re: RE: [ADMIN] High memory usage [PATCH]
Дата
Msg-id m2sngnbci0.fsf@smaug.polygnosis.com
обсуждение исходный текст
Ответ на RE: RE: [ADMIN] High memory usage [PATCH]  ("Dave Cramer" <Dave@micro-automation.net>)
Ответы Re: RE: [ADMIN] High memory usage [PATCH]  (Michael Stephenson <mstephenson@tirin.openworld.co.uk>)
Список pgsql-jdbc
* "Dave Cramer" <Dave@micro-automation.net> wrote:
|
| Bruce, Barry,
|
| How about checking for the existence of the date object in the
| constructor? This would mean that it would only be created once per
| thread.
|

I only briefly reviewd the code in PreparedStatement yeaterday with respect
to the usage of the SimpleDateFormat, my comments :

- Why the ThreadLocal usage, and not just syncronize on the same
  SimpleDateFormat ?

- It seems to that the SimpleDateFormat is never modified after creation.
  Wouldn't this mean that we actually could assign the SimpleDateFormat
  object to a static member, so we only had to create the object once.
  Or is concurrent usage of SimpleDateFormat.format() unsafe ?

I would prefer the latter if safe, as we would get less object creation and
synchronization.

regards,

        Gunnar

--
Gunnar Rønning - gunnar@polygnosis.com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/

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

Предыдущее
От: "Dave Cramer"
Дата:
Сообщение: High Memory Usage Patch -- Disregard my last message
Следующее
От: Michael Stephenson
Дата:
Сообщение: Re: RE: [ADMIN] High memory usage [PATCH]