You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by ml...@amsnet.com on 2001/02/15 21:48:44 UTC
Template Cache Problem
I was testing performace a bit with Velocity. Noticed the CPU jump a bit
when punding on a Velocity servlet. I the set the following property to
true:
resource.loader.1.cache = true
I thought I might see better performance but it was about the same. To
attempt to verify that the templates were actually being cached I modified
a template to see if the change would take affect - and it did. Does this
mean caching is not working proprtly?
I did restart the servlet engine (Tomcat) after modifying the properties
file.
Regards,
Mike
Re: Template Cache Problem
Posted by Christoph Reck <Ch...@dlr.de>.
"Geir Magnusson Jr." wrote:
>
> I think I understand it.
>
> resource.loader.1.modificationCheckInterval is currently in units of
> milliseconds, as far as I can tell.
>
> Anyone care if :
>
> 1) I switch it to seconds. It will only break those dependent upon
> millisecond timing for template reloads :)
+1, second granularity for template reloads is fine.
>
> 2) I make it so a value of 0 means never
+1, for a fully static environement, where once loaded no more
filesystem hits are desireable.
>
> I will document it too.
>
> geir
I once also tested the caching and noticed no perf. difference, but
since I was doing template development, no cachin was an advantage
thus I dod not trace it further...
:) Christoph
Re: Template Cache Problem
Posted by Jon Stevens <jo...@latchkey.com>.
on 2/15/01 4:34 PM, "Geir Magnusson Jr." <ge...@optonline.net> wrote:
> I think I understand it.
>
> resource.loader.1.modificationCheckInterval is currently in units of
> milliseconds, as far as I can tell.
>
> Anyone care if :
>
> 1) I switch it to seconds. It will only break those dependent upon
> millisecond timing for template reloads :)
>
> 2) I make it so a value of 0 means never
>
> I will document it too.
>
> geir
I think that 1 second granularity is fine.
+1 on overloading 0
-jon
--
If you come from a Perl or PHP background, JSP is a way to take
your pain to new levels. --Anonymous
<http://jakarta.apache.org/velocity/> && <http://java.apache.org/turbine/>
Re: Template Cache Problem
Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
I think I understand it.
resource.loader.1.modificationCheckInterval is currently in units of
milliseconds, as far as I can tell.
Anyone care if :
1) I switch it to seconds. It will only break those dependent upon
millisecond timing for template reloads :)
2) I make it so a value of 0 means never
I will document it too.
geir
"Geir Magnusson Jr." wrote:
>
> mlecza@amsnet.com wrote:
> >
> > I was testing performace a bit with Velocity. Noticed the CPU jump a bit
> > when punding on a Velocity servlet. I the set the following property to
> > true:
> > resource.loader.1.cache = true
> >
> > I thought I might see better performance but it was about the same. To
> > attempt to verify that the templates were actually being cached I modified
> > a template to see if the change would take affect - and it did. Does this
> > mean caching is not working proprtly?
> >
>
> set
>
> resource.loader.1.modificationCheckInterval = 0
>
> that *should* stop it for now.
>
> We'll get this cleared up. Thanks!
>
> geir
>
> --
> Geir Magnusson Jr. geirm@optonline.com
> Velocity : it's not just a good idea. It should be the law.
> http://jakarta.apache.org/velocity
--
Geir Magnusson Jr. geirm@optonline.com
Velocity : it's not just a good idea. It should be the law.
http://jakarta.apache.org/velocity
Re: Template Cache Problem
Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
mlecza@amsnet.com wrote:
>
> I was testing performace a bit with Velocity. Noticed the CPU jump a bit
> when punding on a Velocity servlet. I the set the following property to
> true:
> resource.loader.1.cache = true
>
> I thought I might see better performance but it was about the same. To
> attempt to verify that the templates were actually being cached I modified
> a template to see if the change would take affect - and it did. Does this
> mean caching is not working proprtly?
>
set
resource.loader.1.modificationCheckInterval = 0
that *should* stop it for now.
We'll get this cleared up. Thanks!
geir
--
Geir Magnusson Jr. geirm@optonline.com
Velocity : it's not just a good idea. It should be the law.
http://jakarta.apache.org/velocity
Re: Template Cache Problem
Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Indeed, there is a problem there. I just checked on a machine I have in
production.
Thanks! We'll have that fixed in a jiffy!
geir
"Geir Magnusson Jr." wrote:
>
> mlecza@amsnet.com wrote:
> >
> > I was testing performace a bit with Velocity. Noticed the CPU jump a bit
> > when punding on a Velocity servlet. I the set the following property to
> > true:
> > resource.loader.1.cache = true
> >
> > I thought I might see better performance but it was about the same. To
> > attempt to verify that the templates were actually being cached I modified
> > a template to see if the change would take affect - and it did. Does this
> > mean caching is not working proprtly?
>
> It may, but I am pretty sure it works...
>
> Does your log file correctly report that property as being overridden?
> It will report to you every property that you specify in your properties
> file.
>
> (That's a way of ensuring that it's really being read.... )
>
> geir
>
> --
> Geir Magnusson Jr. geirm@optonline.com
> Velocity : it's not just a good idea. It should be the law.
> http://jakarta.apache.org/velocity
--
Geir Magnusson Jr. geirm@optonline.com
Velocity : it's not just a good idea. It should be the law.
http://jakarta.apache.org/velocity
Re: Template Cache Problem
Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
mlecza@amsnet.com wrote:
>
> I was testing performace a bit with Velocity. Noticed the CPU jump a bit
> when punding on a Velocity servlet. I the set the following property to
> true:
> resource.loader.1.cache = true
>
> I thought I might see better performance but it was about the same. To
> attempt to verify that the templates were actually being cached I modified
> a template to see if the change would take affect - and it did. Does this
> mean caching is not working proprtly?
It may, but I am pretty sure it works...
Does your log file correctly report that property as being overridden?
It will report to you every property that you specify in your properties
file.
(That's a way of ensuring that it's really being read.... )
geir
--
Geir Magnusson Jr. geirm@optonline.com
Velocity : it's not just a good idea. It should be the law.
http://jakarta.apache.org/velocity