Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 90388 invoked from network); 4 Nov 2009 11:09:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Nov 2009 11:09:07 -0000 Received: (qmail 11094 invoked by uid 500); 4 Nov 2009 11:09:06 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 11022 invoked by uid 500); 4 Nov 2009 11:09:05 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 11011 invoked by uid 99); 4 Nov 2009 11:09:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 11:09:05 +0000 X-ASF-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of knst.kolinko@gmail.com designates 209.85.218.221 as permitted sender) Received: from [209.85.218.221] (HELO mail-bw0-f221.google.com) (209.85.218.221) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 11:09:03 +0000 Received: by bwz21 with SMTP id 21so8661083bwz.24 for ; Wed, 04 Nov 2009 03:08:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=R7MC6j8P0hPJjlnbtVD1YgDB9tf/CocECdtK1iTSGVc=; b=Cg0XQeKFabEzJaIBVvYsEHy+hWnIOmwDNACj2OK1T3r9bVxn0bRUjh5ngastvSviKa 58LBUcofNoyC51LW7LGCdDIaDtoPvMoba56YDe+HA6PNYQp3Vz5SA3MMThp2V28XbaKn sLjVWfSlfFFSeP2LqXKQazjqHoEQSkTdSGghA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=Jzh3UYg2g3ogAZ4r/Xoc+HYoj7OcAUO8GBpi+CY6mpDETIsApJ7BjmW16j01FWjWke 7lOBkF8w7lhB2Qlof1/qv3SNBhofBIhlzb1ig4mHCzuYY1I7cQY+erfgvth0YrgTifKJ 8yXHNShz337MMYkOoDlOlaKxY0ukAVGi1nOPY= MIME-Version: 1.0 Received: by 10.102.226.14 with SMTP id y14mr509720mug.76.1257332921725; Wed, 04 Nov 2009 03:08:41 -0800 (PST) In-Reply-To: <4AF07237.2030200@apache.org> References: <20091102184621.C62F7238898D@eris.apache.org> <1257197441.2470.24.camel@work.remm.hd.free.fr> <4AF05726.4030208@hanik.com> <4AF07237.2030200@apache.org> Date: Wed, 4 Nov 2009 14:08:41 +0300 Message-ID: <427155180911040308y89ccc1fna6ca4035742363d0@mail.gmail.com> Subject: Re: svn commit: r832039 - in /tomcat/trunk/java/org/apache/naming: HandlerRef.java ResourceRef.java ServiceRef.java StringManager.java resources/DirContextURLStreamHandler.java From: Konstantin Kolinko To: Tomcat Developers List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2009/11/3 Mark Thomas : > Filip Hanik - Dev Lists wrote: >> On 11/02/2009 02:30 PM, Remy Maucherat wrote: >>> On Mon, 2009-11-02 at 18:46 +0000, markt@apache.org wrote: >>> >>>> Author: markt >>>> Date: Mon Nov =A02 18:46:21 2009 >>>> New Revision: 832039 >>>> >>>> URL: http://svn.apache.org/viewvc?rev=3D832039&view=3Drev >>>> Log: >>>> StringBuffer -> =A0StringBuilder for o.a.naming >>>> >>> So I did not test or anything, but is SBuilder faster than SBuffer ? Or >>> it uses less resources ? >>> >> >> in most uses cases you'd barely see a difference. As speed locking has >> gotten much better. (my unqualified guess is that locking is optimistic) >> The only time you'd see a difference is if there was an actual >> contention on the resource, which with StringBuffers is rare too. > > I'm leaning towards not porting this to 6.0.x since there is no clear > performance issue caused by StringBuffer in 6.0.x. That said, the Javadoc= for > StringBuilder is enough to convince me that we should make the change in = trunk > as part of the general clean-up/improvement of the code for Tomcat 7. > > Mark > In my opinion, this change in no way different from any other. Though it is not urgent, as nobody depends on it. If anyone can find some time to review and vote for any subset of those 50+ patches, and there will be enough votes, I will be happy to commit it. One benefit would be better alignment of TC 7 and TC 6 code and thus easier backport of patches. The 6.0 -> 5.5 backports will need the StringBuilder -> StringBuffer conversion anyway, so those are unaffected. Regarding the StringBuilder: They have a common base class, AbstractStringBuilder, that provides the implementation for them. What they add on top of it are classcasts, and synchronization. Best regards, Konstantin Kolinko --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org