Return-Path: Delivered-To: apmail-jakarta-hivemind-user-archive@www.apache.org Received: (qmail 26747 invoked from network); 24 May 2005 18:26:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 24 May 2005 18:26:39 -0000 Received: (qmail 11179 invoked by uid 500); 24 May 2005 18:26:38 -0000 Delivered-To: apmail-jakarta-hivemind-user-archive@jakarta.apache.org Received: (qmail 10985 invoked by uid 500); 24 May 2005 18:26:37 -0000 Mailing-List: contact hivemind-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: hivemind-user@jakarta.apache.org List-Id: Delivered-To: mailing list hivemind-user@jakarta.apache.org Received: (qmail 10971 invoked by uid 99); 24 May 2005 18:26:37 -0000 X-ASF-Spam-Status: No, hits=1.8 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from smtp109.mail.sc5.yahoo.com (HELO smtp109.mail.sc5.yahoo.com) (66.163.170.7) by apache.org (qpsmtpd/0.28) with SMTP; Tue, 24 May 2005 11:26:35 -0700 Received: (qmail 32851 invoked from network); 24 May 2005 18:26:34 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Received:Message-ID:Date:From:User-Agent:X-Accept-Language:MIME-Version:To:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=URmJCBCSV7cw8PEmZxC5y8eN/8ILHPhWMcROH+elJD6VdgfSZX3onYOK4/EGdx2PritnayrOt7yZWHySYbyDzDmyYNqT/3RwcNUEN18yYlekwjLH4Igj3iJ+swww1g6gmhjaz7ecvQXuhroseaMXbhMx6nHk7n115sUxjxbJrqA= ; Received: from unknown (HELO ?10.2.2.56?) (kgignatyev@70.249.165.65 with plain) by smtp109.mail.sc5.yahoo.com with SMTP; 24 May 2005 18:26:33 -0000 Message-ID: <429371DD.40800@yahoo.com> Date: Tue, 24 May 2005 13:26:37 -0500 From: Konstantin Iignatyev User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: en-us, en MIME-Version: 1.0 To: hivemind-user@jakarta.apache.org Subject: Re: Interceptor performance References: <40906.194.3.231.254.1116840453.squirrel@webmail.verideon.net> <20050523132325.83377.qmail@web14622.mail.yahoo.com> <21698.194.3.231.254.1116917426.squirrel@webmail.verideon.net> In-Reply-To: <21698.194.3.231.254.1116917426.squirrel@webmail.verideon.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Michael Mattox wrote: >>Some time ago I compared interceptors performance, HM >>is not bad: >>http://kgionline.com/articles/aop_1/aop_perf.jsp >> >> > >Your page was very interesting, thanks. > You are welcome. > I was suprised at the performance >results, I didn't expect them to be that bad. I remember when I was >playing with AspectWerkz 1.x almost a year ago, I remember them claiming >the performance hit was around 10%. I was thinking 10% I can live with. >But the other day when I read 50% for JDK proxies I became concerned. >When I see your performance results, for HiveMind the difference is 22x >slower with the interceptor! > It is not that bad. See, HiveMind is just 4 times slower than CGLib based interceptor, and CGLib seems to be fastest. IMO that particular performance degradation is not big deal if used in few places ( usually layer boundaries), but may cause problems if AOP system used unwisely. >Now what's interesting is that someone else >pointed out that when measured with real code the difference in perf won't >be noticeable. I'm not so sure about that. > Well, Hibernate seems to work just fine and I do not hear many complaints about its performance (it uses CGLib, in fact that is exactly why I started exploring CGLib and ended up using my little CGLib based class enhancer). Tapestry works OK too ( uses Javassist). JBoss-AOP (Javassist) is slightly faster than HM, but less convenient to use IMO. >Here's what I'm looking at: >My client would like the ability to add a cache to services and would like >this cache to be transparent. So I'm looking at the HiveMind interceptors >to make a cache interceptor that can be applied to any service. It's a >good idea, but if it slows down the performance 50% then I think we will >have performance problems. > Performance will degrade only if getting the data again takes less time than interceptor imposed delay. >The site is a very high profile site (lots of >activity). So I'm debating if we should continue with this cache >interceptor approach and then measure the perf and if it's too slow then >we deal with it later (for example make the cache non-transparent), or if >we should just abandon the cache interceptor now. > Well, you may try using build-time interceptors with XDoclet code generator. I initially used the approach but then abandoned it in favor of CGLib. >Normally I prefer to >deal with performance problems when they arise but this one seems very >high risk so I think it merits at least a small prototype, which I'll >probably need to do anyway in order to learn more about HiveMind. > > Wise plan. >Regards, >Michael > > -- Thanks, Konstantin Ignatyev http://www.kgionline.com PS: If this is a typical day on planet earth, humans will add fifteen million tons of carbon to the atmosphere, destroy 115 square miles of tropical rainforest, create seventy-two miles of desert, eliminate between forty to one hundred species, erode seventy-one million tons of topsoil, add 2.700 tons of CFCs to the stratosphere, and increase their population by 263.000 Bowers, C.A. The Culture of Denial: Why the Environmental Movement Needs a Strategy for Reforming Universities and Public Schools. New York: State University of New York Press, 1997: (4) (5) (p.206) --------------------------------------------------------------------- To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: hivemind-user-help@jakarta.apache.org