You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Daniel L. Rall" <dl...@finemaltcoding.com> on 2000/09/25 00:57:30 UTC

caching

Jason van Zyl wrote:
> 
> On Sun, 24 Sep 2000, Jon Stevens wrote:
> > Also, I still don't understand how you can't just get a reference to the
> > root of the parsed tree and simply serialize it to disk.
> 
> I think that is totally possible as well. I was just looking
> the the JPython source and it just hit home. Serializing
> an optimized AST will probably going tohappen long before the
> compiling phase does.

I hope we keep the parsed AST in memory until Velocity needs to restart
or shutdown, *then* write to disk.
-- 

Daniel Rall <dl...@finemaltcoding.com>

Re: caching

Posted by "Daniel L. Rall" <dl...@finemaltcoding.com>.
Jason van Zyl wrote:
> 
> On Sun, 24 Sep 2000, Daniel L. Rall wrote:
> 
> > Jason van Zyl wrote:
> > >
> > > On Sun, 24 Sep 2000, Jon Stevens wrote:
> > > > Also, I still don't understand how you can't just get a reference to the
> > > > root of the parsed tree and simply serialize it to disk.
> > >
> > > I think that is totally possible as well. I was just looking
> > > the the JPython source and it just hit home. Serializing
> > > an optimized AST will probably going tohappen long before the
> > > compiling phase does.
> >
> > I hope we keep the parsed AST in memory until Velocity needs to restart
> > or shutdown, *then* write to disk.
> 
> I was talking more along the lines of deployment, having a
> bunch of serialized/compiled templates in the webapp that
> get picked up when the webapp starts. But we could definitely
> employ the serialization to prevent having to parse a whole
> set of templates again on startup.

Yummy.  Sounds like a good thing to deploy in a WAR.
-- 

Daniel Rall <dl...@finemaltcoding.com>

Re: caching

Posted by Jason van Zyl <jv...@periapt.com>.
On Sun, 24 Sep 2000, Daniel L. Rall wrote:

> Jason van Zyl wrote:
> > 
> > On Sun, 24 Sep 2000, Jon Stevens wrote:
> > > Also, I still don't understand how you can't just get a reference to the
> > > root of the parsed tree and simply serialize it to disk.
> > 
> > I think that is totally possible as well. I was just looking
> > the the JPython source and it just hit home. Serializing
> > an optimized AST will probably going tohappen long before the
> > compiling phase does.
> 
> I hope we keep the parsed AST in memory until Velocity needs to restart
> or shutdown, *then* write to disk.

I was talking more along the lines of deployment, having a
bunch of serialized/compiled templates in the webapp that
get picked up when the webapp starts. But we could definitely
employ the serialization to prevent having to parse a whole
set of templates again on startup.

jvz.
 
-- 

Jason van Zyl
jvanzyl@periapt.com