Skip site navigation (1) Skip section navigation (2)

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

From: Gunnar Rønning <gunnar(at)polygnosis(dot)com>
To: <Dave(at)micro-automation(dot)net>
Cc: "'Bruce Momjian'" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "'Barry Lind'" <barry(at)xythos(dot)com>, "'PostgreSQL jdbc list'" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: RE: [ADMIN] High memory usage [PATCH]
Date: 2001-06-26 13:24:07
Message-ID: m2sngnbci0.fsf@smaug.polygnosis.com (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-jdbcpgsql-patches
* "Dave Cramer" <Dave(at)micro-automation(dot)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(at)polygnosis(dot)com
Senior Consultant, Polygnosis AS, http://www.polygnosis.com/

In response to

Responses

pgsql-admin by date

Next:From: Michael StephensonDate: 2001-06-26 13:37:09
Subject: Re: RE: [ADMIN] High memory usage [PATCH]
Previous:From: Dave CramerDate: 2001-06-26 12:29:20
Subject: High Memory Usage Patch -- Disregard my last message

pgsql-patches by date

Next:From: Michael StephensonDate: 2001-06-26 13:37:09
Subject: Re: RE: [ADMIN] High memory usage [PATCH]
Previous:From: Dave CramerDate: 2001-06-26 12:29:20
Subject: High Memory Usage Patch -- Disregard my last message

pgsql-jdbc by date

Next:From: Michael StephensonDate: 2001-06-26 13:37:09
Subject: Re: RE: [ADMIN] High memory usage [PATCH]
Previous:From: Dave CramerDate: 2001-06-26 12:29:20
Subject: High Memory Usage Patch -- Disregard my last message

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group