synchronized code - Mailing list pgsql-jdbc

From Felipe Schnack
Subject synchronized code
Date
Msg-id 1042051391.11833.108.camel@desenv1.ritterdosreis.br
Whole thread Raw
Responses Re: synchronized code [Viruschecked]  ("Patric Bechtel" <bechtel@ipcon.de>)
List pgsql-jdbc
  I'm quite worried with the amount of synch'd code in our jdbc driver
code, we all know this is a very costly operation in Java.
  As far as I could see from the sources, the sole objective of these
calls are to avoid two processes accessing the same shared StringBuffer
we use. The strangest thing, IMHO, is that every time we use this
buffer, we are calling setLength(0) or, in plain english, resetting this
buffer. Is just me the paranoid or this isn't helping performance at
all? As I understand java, object creating is a very cheap operation
these days (in the old days it was slow), but synch'ing is VERY
costly...


--

Felipe Schnack
Analista de Sistemas
felipes@ritterdosreis.br
Cel.: (51)91287530
Linux Counter #281893

Centro Universitário Ritter dos Reis
http://www.ritterdosreis.br
ritter@ritterdosreis.br
Fone/Fax.: (51)32303341


pgsql-jdbc by date:

Previous
From: Felipe Schnack
Date:
Subject: server-side prepared
Next
From: "Michael Paesold"
Date:
Subject: Re: synchronized code