You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Robin Green <gr...@hotmail.com> on 2000/09/13 21:33:51 UTC

Fwd: Re: performance issues

>From: "Jens Lorenz" <je...@interface-business.de>
>To: <gr...@hotmail.com>
>Subject: Re: performance issues
>Date: Wed, 13 Sep 2000 17:44:02 +0200
>
>----- Original Message -----
>From: Robin Green <gr...@hotmail.com>
>To: <co...@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)
>
>
>Just wanted to say thanks again ...
>
>
>Regards,
>
>Jens
>
>--
>
>jens.lorenz@interface-business.de
>
>interface:business GmbH                             \\|//
>Tolkewitzer Strasse 49                              (o o)
>01277 Dresden                               ~~~~oOOo~(_)~oOOo~~~~
>Germany
>
>

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


Re: Fwd: Re: performance issues

Posted by Stefano Mazzocchi <st...@apache.org>.
Robin Green wrote:
> 
> >From: "Jens Lorenz" <je...@interface-business.de>
> >To: <gr...@hotmail.com>
> >Subject: Re: performance issues
> >Date: Wed, 13 Sep 2000 17:44:02 +0200
> >
> >----- Original Message -----
> >From: Robin Green <gr...@hotmail.com>
> >To: <co...@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.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------