cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davanum Srinivas <d...@yahoo.com>
Subject Re: [C2] Precompiled sites
Date Thu, 22 Feb 2001 12:08:47 GMT
Berin,

Checked in a fix to ProgramGeneratorImpl.java. Please cross-check.

Thanks,
dims

--- Berin Loritsch <bloritsch@apache.org> wrote:
> Davanum Srinivas wrote:
> > 
> > Berin,
> > 
> > Any pointers on where to start and how to recreate the problem?
> 
> The problem is this:
> 
> ProgramGeneratorImpl asks GeneratorSelector for a Component.  The
> GeneratorSelector stores all the compiled classes as the normalized
> name (which is a close alias to the Class Name).
> 
> The GeneratorSelector is supposed to try to grab the component from
> itself (before the ProgramGenerator tries compiling the page).  If
> it fails, it tries to add the CompiledComponent to itself by making
> the translation from NormalizedName and ClassName, and loading the
> class.  It then tries to select the component again.  If it fails
> the second time, the GeneratorSelector gives up and throws a
> ComponentNotAccessibleException that is logged.
> 
> The normal flow of operations quickly follows suit.
> 
> In order to reproduce the desired result:
> 1) start up the Servlet Engine
> 2) go to the front page--this will compile the sitemap
> 3) shut down the Servlet Engine
> 4) start up the Servlet Engine
> 5) go to the front page--this *SHOULD* use the precompiled sitemap.
> 
> > 
> > Thanks,
> > dims
> > 
> > --- Berin Loritsch <bloritsch@apache.org> wrote:
> > > Davanum Srinivas wrote:
> > > >
> > > > Berin,
> > > >
> > > > If you need another pair of eyes. I can take a look.
> > >
> > > Feel free. I already spent too much time on it.
> > >
> > > >
> > > > Thanks,
> > > > dims
> > > >
> > > > --- Berin Loritsch <bloritsch@apache.org> wrote:
> > > > > Stefano Mazzocchi wrote:
> > > > > >
> > > > > > Davanum Srinivas wrote:
> > > > > > >
> > > > > > > Berin,
> > > > > > >
> > > > > > > How do i pre-compile a site? Can you post the procedure?
> > > > > >
> > > > > > Yeah, I'm curious as well.
> > > > > >
> > > > > > Also, I believe it would be a total win for Cocoon2 to be able
to
> > > > > > generate a 'fully precompiled' site. Not only compiled bytecode,
but
> > > > > > also compiled XML. It's pretty easy to come up with a SAX parser
wrapper
> > > > > > that understands if the XML is compiled or not. (just check
for the
> > > > > > first bytes to be "XMLC10", 'C' for 'compiled') this will reduce
parsing
> > > > > > time and improve performance.
> > > > > >
> > > > > > But gives us another big win: production sites are untouchable!!!
> > > > > >
> > > > > > In many situations, production sites are 'touched' and modified
without
> > > > > > back-porting the changes to the development trunk, this normally
creates
> > > > > > friction and overhead. By proposing a good practice of "build
site" that
> > > > > > generates the full 'war with precompiled everything' that can
be
> > > > > > deployed and forgotten.
> > > > > >
> > > > > > A great thing would be to precompile the sitemap as well.
> > > > >
> > > > > All possible--but not fully implemented.  Sitemaps are created with
> > > > > the ProgramGeneratorImpl class as well as the XSP files.  There is
> > > > > no problem with compiling the sitemap ahead of time.  The
> > > > > GeneratorSelector needs to see if the class exists in the repository,
> > > > > and then load it if it can't be found through normal channels.  I
> > > > > have code that looks like it should work, but I still can't find
> > > > > out why it isn't loading the precompiled class...
> > > > >
> > > > > >
> > > > > > Oh, well, just food for thought.
> > > > > >
> > > > > > --
> > > > > > Stefano Mazzocchi      One must still have chaos in oneself
to be
> > > > > >                           able to give birth to a dancing star.
> > > > > > <stefano@apache.org>                             Friedrich
Nietzsche
> > > > > > --------------------------------------------------------------------
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > > > > For additional commands, email: cocoon-dev-help@xml.apache.org
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > > > > For additional commands, email: cocoon-dev-help@xml.apache.org
> > > > >
> > > >
> > > > =====
> > > > Davanum Srinivas, JNI-FAQ Manager
> > > > http://www.jGuru.com/faq/JNI
> > > >
> > > > __________________________________________________
> > > > Do You Yahoo!?
> > > > Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/
> > 
> > =====
> > Davanum Srinivas, JNI-FAQ Manager
> > http://www.jGuru.com/faq/JNI
> > 
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/


=====
Davanum Srinivas, JNI-FAQ Manager
http://www.jGuru.com/faq/JNI

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices! http://auctions.yahoo.com/

Mime
View raw message