cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: Fwd: Re: performance issues
Date Thu, 14 Sep 2000 13:08:42 GMT
Robin Green wrote:
> 
> >From: "Jens Lorenz" <jens.lorenz@interface-business.de>
> >To: <greenrd@hotmail.com>
> >Subject: Re: performance issues
> >Date: Wed, 13 Sep 2000 17:44:02 +0200
> >
> >----- Original Message -----
> >From: Robin Green <greenrd@hotmail.com>
> >To: <cocoon-users@xml.apache.org>
> >Sent: Saturday, September 09, 2000 1:53 AM
> >Subject: Re: performance issues
> >
> >
> >Hi Robin,
> >
> > > >Well. I wonder, if it could be implemented in the xspexpr(Object o,
> > > >Document
> > > >d)
> > > >method of XSPPage.java ... Just a test like
> > > >if (o instanceof Node)
> > > >   if ( ((Node)o).getOwnerDocument() != d)
> > > >     // clone the tree via XSPUtil
> > > >   else
> > > >     // appendChild and so on
> > > >
> > > >
> > > >... but I've no overview of the Cocoon structure to see if this might
> >work
> > > >...
> > > >
> > >
> > >
> > > Great idea! I see no reason why that shouldn't work. Here is the exact
> >patch
> > > - I'll apply it as soon as poss.
> > >
> > > --- src/org/apache/cocoon/processor/xsp/XSPPage.bak     Thu Apr  6
> >10:16:10
> > > 2000
> > > +++ src/org/apache/cocoon/processor/xsp/XSPPage.java    Fri Sep  8
> >23:47:10
> > > 2000
> > >
> > > @@ -141,7 +141,12 @@
> > >
> > >      // Already a node? Use it verbatim
> > >      if (v instanceof Node) {
> > > -      return XSPUtil.cloneNode((Node) v, factory);
> > > +      if (((Node) v).getOwnerDocument () == factory) {
> > > +        return (Node) v;
> > > +      }
> > > +      else {
> > > +        return XSPUtil.cloneNode((Node) v, factory);
> > > +      }
> > >      }
> > >
> > >      // Array: recurse over each element
> >
> >I already said, that I applied the patch ... But I just wanted
> >to mention, that this little patch _really_ improves the speed
> >of Cocoon ...
> >I've now ported big parts of my tag lib to Cocoon2 comptabile
> >XObject interface and while the average speed was formerly
> >around 200 milliseconds it's now just above
> >100 milliseconds ... (and the only thing that changed and that
> >I'm aware of is this change in Cocoon)

Robin, did this make it into CVS already?

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<stefano@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Mime
View raw message