From: | Michael Stephenson <mstephenson(at)tirin(dot)openworld(dot)co(dot)uk> |
---|---|
To: | "'PostgreSQL jdbc list'" <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: RE: [ADMIN] High memory usage [PATCH] |
Date: | 2001-06-26 13:37:09 |
Message-ID: | Pine.LNX.4.30.0106261432330.21133-100000@tirin.openworld.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin pgsql-jdbc pgsql-patches |
> 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 ?
This won't scale. :o)
> - 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 ?
SimpleDateFormat.format() and SimpleDateFormat.parse() are not threadsafe,
I believe the relevant 'bug' is 4228335.
> I would prefer the latter if safe, as we would get less object creation and
> synchronization.
The latter is what we used to have until it became clear that it wasn't
threadsafe.
I think the ThreadLocal solution is the best one available in the
circumstances.
Michael xxx
From | Date | Subject | |
---|---|---|---|
Next Message | Gunnar Rønning | 2001-06-26 13:47:23 | Re: Re: RE: [ADMIN] High memory usage [PATCH] |
Previous Message | Gunnar Rønning | 2001-06-26 13:24:07 | Re: RE: [ADMIN] High memory usage [PATCH] |
From | Date | Subject | |
---|---|---|---|
Next Message | Gunnar Rønning | 2001-06-26 13:47:23 | Re: Re: RE: [ADMIN] High memory usage [PATCH] |
Previous Message | Gunnar Rønning | 2001-06-26 13:24:07 | Re: RE: [ADMIN] High memory usage [PATCH] |
From | Date | Subject | |
---|---|---|---|
Next Message | Gunnar Rønning | 2001-06-26 13:47:23 | Re: Re: RE: [ADMIN] High memory usage [PATCH] |
Previous Message | Gunnar Rønning | 2001-06-26 13:24:07 | Re: RE: [ADMIN] High memory usage [PATCH] |