pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gunnar Rønning <gunnar@polygnosis.com>
To: Dave@micro-automation.net
Cc: 'Bruce Momjian' <pgman@candle.pha.pa.us>
Cc: 'Barry Lind' <barry@xythos.com>
Cc: 'PostgreSQL jdbc list' <pgsql-jdbc@postgresql.org>
Subject: Re: RE: [ADMIN] High memory usage [PATCH]
Date: 26 Jun 2001 15:24:07 +0200
Message-ID: <m2sngnbci0.fsf@smaug.polygnosis.com> (raw)
In-Reply-To: <000a01c0fdb0$8512d810$0201a8c0@INSPIRON>
References: <000a01c0fdb0$8512d810$0201a8c0@INSPIRON>

* "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/



view thread (46+ messages)  latest in thread

Message-ID: <m2sngnbci0.fsf@smaug.polygnosis.com>
Permalink:  ../m2sngnbci0.fsf@smaug.polygnosis.com/
Also on:    postgresql.org/message-id/m2sngnbci0.fsf@smaug.polygnosis.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: gunnar@polygnosis.com, Dave@micro-automation.net, pgman@candle.pha.pa.us, barry@xythos.com, pgsql-jdbc@postgresql.org
  Subject: Re: [ADMIN] High memory usage [PATCH]
  In-Reply-To: <m2sngnbci0.fsf@smaug.polygnosis.com>
  References: <000a01c0fdb0$8512d810$0201a8c0@INSPIRON> <m2sngnbci0.fsf@smaug.polygnosis.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox