cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Scott Boag/CAM/Lotus" <Scott_B...@lotus.com>
Subject Re: cache thoughts
Date Wed, 23 Feb 2000 19:28:02 GMT

Stylesheets absolutely need to be cached.  As Xalan moves further down the
path to high performance, one of the major strategies is to move more stuff
from run-time to construction time... in fact we plan to seperate out the
construction stuff into a "compiler" package.  So you should think of Xalan
as more of a compiler/processor than a XSLT interpreter/processor.
Normally, you wouldn't think about compiling Java for every rendering, so
why would it be done for XSLT.

We've done a lot of work making stylesheet objects and XPath objects and
extensions totally threadsafe, so there should be very little or no
synchronization occuring during the transformation.

The other major issue is the DOM output's and input's for the source and
result trees.  If you enable Xalan with SAX, not only is the performance
good, but in many cases it can do a good job doing incremental
transforms... getting bytes out to the output stream while the input parse
is still occuring.  And the expense of creating an output DOM is a huge
overhead.

We've done some recent tests that showed XalanJ outperforming and
outscaling equivelent ASP/MS XSL technology by a pretty good margin...
pretty good considering those processors are written in C++.  With the
right setup, the recent builds of Xalan are getting close to being viable
for commercial server deployment.

> Any thoughts.  If this is a valid assumption is this something that needs
to
> be cached by Cocoon or by xalan?

I don't think this should be a service provided by Xalan.  Xalan already
has too much bloat and feature creep in it (which we'll be working on).
The Stylesheet Pool should be a service of Cocoon, in my opinion.

-scott




                                                                                         
                            
                    Mike Engelhart                                                       
                            
                    <mengelhart@eart        To:     Cocoon Dev <cocoon-dev@xml.apache.org>
                           
                    htrip.com>              cc:     (bcc: Scott Boag/CAM/Lotus)       
                               
                                            Subject:     cache thoughts                  
                            
                    02/23/00 11:39                                                       
                            
                    AM                                                                   
                            
                    Please respond                                                       
                            
                    to cocoon-dev                                                        
                            
                                                                                         
                            
                                                                                         
                            




I've been mulling over the cache issue over the last 24 hours and have some
thoughts i'd like to air out.

In my particular development instance, I actually don't want the final
output page cached because the data is retrieved from a real-time
transaction system.  That said, what I do think needs to be cached are the
style sheets that are used to generate the final output.  Reading in one or
more stylesheets from disk is always going to be slow especially if you're
using includes or imports.  It seems to me that the xalan processing speed
is pretty amazing.  All of my pages are completely dynamic XSP down to the
localized text being read out of java.util.ResourceBundle's and my pages
are
relatively quickly (about 2.5-3x slower than a static html file) including
reading 2 stylesheets and all the dynamic XSP stuff and the fact that it's
running through Apache->JServ->Tomcat->Cocoon and back out.(Yikes that's a
mess!!).  I would think that not having to read in the XSL sheet would
significantly speed up the process.

Any thoughts.  If this is a valid assumption is this something that needs
to
be cached by Cocoon or by xalan?  If it's cocoon, would the existing cache
model work well for this?

Mike






Mime
View raw message