Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 39325 invoked from network); 31 Oct 2003 15:42:38 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 31 Oct 2003 15:42:38 -0000 Received: (qmail 53360 invoked by uid 500); 31 Oct 2003 15:42:29 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 53335 invoked by uid 500); 31 Oct 2003 15:42:28 -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 53322 invoked from network); 31 Oct 2003 15:42:28 -0000 Received: from unknown (HELO main.gmane.org) (80.91.224.249) by daedalus.apache.org with SMTP; 31 Oct 2003 15:42:28 -0000 Received: from list by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AFbPy-0000Ja-00 for ; Fri, 31 Oct 2003 16:42:30 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: dev@cocoon.apache.org Received: from sea.gmane.org ([80.91.224.252]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AFbPx-0000JS-00 for ; Fri, 31 Oct 2003 16:42:29 +0100 Received: from news by sea.gmane.org with local (Exim 3.35 #1 (Debian)) id 1AFbPx-0003Yw-00 for ; Fri, 31 Oct 2003 16:42:29 +0100 From: Sylvain Wallez Subject: Re: [IMP] Performance problems with TraxTransformer Date: Fri, 31 Oct 2003 16:42:28 +0100 Lines: 48 Message-ID: References: <3FA07B5C.6060205@verizon.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: fr, en, en-us In-Reply-To: <3FA07B5C.6060205@verizon.net> Sender: news X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Vadim Gritsenko wrote: > Sylvain Wallez wrote: > >> XSLTProcessor >> ------------- >> This component's design is intrinsically bad from a cache >> perspective: the only way to access validity is through >> getTransformerHandlerAndValidity which always creates the >> TransformerHandler even if we don't use it. Combine this with >> use-store=false, and we end up reparsing the XSL at each call. > > > > The only way to obtain validity is to get it from the store. If store > is not present, the alternative is to *compute* validity, which > involves XSLT parsing and results in templates object. It will be > silly to compute validity and loose templates, that's why method > returns both at once. > > If store is used, then templates are obtainer from the store for free, > i.e. no CPU cycles used. Not exactly: the method returns a TransformerHandler, and not a Templates (which serves as a factory to build TransformerHandlers). And creating a TransformerHandler is a costly operation that is useless when the pipeline is not executed and the result retrieved from the cache. So a speed optimisation could consist in having TransformerHandlerAndValidity create the handler lazily only when requested, which would not occur if the pipeline is not executed. For this, we need TransformerHandlerAndValidity to hold the Templates object. What do you think? Sylvain -- Sylvain Wallez Anyware Technologies http://www.apache.org/~sylvain http://www.anyware-tech.com { XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects } Orixo, the opensource XML business alliance - http://www.orixo.com