Re: synchronized code
От | Felipe Schnack |
---|---|
Тема | Re: synchronized code |
Дата | |
Msg-id | 1042053452.11829.126.camel@desenv1.ritterdosreis.br обсуждение исходный текст |
Ответ на | synchronized code (Felipe Schnack <felipes@ritterdosreis.br>) |
Список | pgsql-jdbc |
Yes... but what got better with JVM 1.4 was synch'ing not object creation, so you're basically saying I'm correct? :-) In tomcat discussion lists, that I'm also in, is quite a common belief that object creating is cheaper... and they're also worried about 1.3 compatibility (just take a look at java.nio thread some weeks ago) Anyway, this is easily benchmarked. On Wed, 2003-01-08 at 16:53, Michael Paesold wrote: > Felipe Schnack <felipes@ritterdosreis.br> wrote: > > > 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... > > Sun claims that with Java 1.4, synchronization isn't *that* expensive > anymore. Anyway, object creation has improved, too. Which JVM are most > people using? Probably more people still use 1.3, especially with J2EE. Just > my $0.02. > > Regards, > Michael > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster -- 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 по дате отправления: