From dev-return-69958-apmail-cocoon-dev-archive=cocoon.apache.org@cocoon.apache.org Wed Jan 05 20:48:15 2005 Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 88427 invoked from network); 5 Jan 2005 20:48:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 5 Jan 2005 20:48:11 -0000 Received: (qmail 39110 invoked by uid 500); 5 Jan 2005 20:48:06 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 39033 invoked by uid 500); 5 Jan 2005 20:48:05 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@cocoon.apache.org Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 39020 invoked by uid 99); 5 Jan 2005 20:48:05 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from Unknown (HELO pulse.betaversion.org) (62.140.213.123) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 05 Jan 2005 12:48:02 -0800 Received: (qmail 27849 invoked from network); 5 Jan 2005 20:47:58 -0000 Received: from unknown (HELO ?127.0.0.1?) (stefano@127.0.0.1) by pulse.betaversion.org with SMTP; 5 Jan 2005 20:47:58 -0000 Message-ID: <41DC5280.9010109@apache.org> Date: Wed, 05 Jan 2005 15:48:00 -0500 From: Stefano Mazzocchi Organization: Apache Software Foundation User-Agent: Mozilla Thunderbird 1.0 (Macintosh/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: Experimental lazy-loading in ECM++ References: <41DC2792.40506@apache.org> In-Reply-To: <41DC2792.40506@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Sylvain Wallez wrote: > Hi all, > > I (once again) did some refactoring in ECM++ to implement a lazy-loading > strategy for components. Using this strategy, a component is loaded > (including it's class) only when looked up. This heavily reduces > Cocoon's initialization time. > > Some quick measurement of the time spent in Cocoon.initialize() and > Cocoon.process() for the first request on my laptop give the following > numbers (in seconds): > - standard "load all" strategy : initialize - 13.6 / process - 4.4 > - lazy loading strategy : initialize - 3.3 / process - 3.7 swish, swish [sound of Stefano polishing his current hero plate with Sylvain's name on top] > The purpose of this mode is to leverage the autocompiling classloader, > by making it usable to automatically restart Cocoon whenever an > automatically-compiled class is modified. We would then have the > type-safety and IDE-friendlyness of Java combined with the hot-reload > abilities of scripted languages. > > This lazy mode is not activated by default. To use it, set > JAVA_OPTIONS="-Dorg.apache.cocoon.core.LazyMode=true" before starting > "cocoon.sh servlet". Why not? Given the above speedup times, I would suggest we turn this on by default, what do you think? > ECM++ can be made even more lazy, so expect some more speedup soon. I have the polishing towel ready :-) -- Stefano.