You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by ChadDavis <ch...@gmail.com> on 2010/03/24 17:35:14 UTC

performance of init

I'm considering a use case where I re-init a velocityEngine with each
request in a web application.  Specifically, I'm re-configuring the
directories hit by a filesystem loader.  Is there any particular
reason to think that this would incur severe performance hits?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Re: performance of init

Posted by ChadDavis <ch...@gmail.com>.
On Wed, Mar 24, 2010 at 11:43 AM, Nathan Bubna <nb...@gmail.com> wrote:
> I don't know.  What you are planning is not recommended, and init has
> not been subjected to much optimization, i can tell you that.  The
> biggest hits, though are not likely to be the initialization itself so
> much as the fact that a re-init will mean that you get little or no
> use out of the template caching or class mapping.  If you are up to
> the task, i would recommend trying to solve your particular problem
> some other way.  The two most useful facilities for dynamic filesystem
> challenges are an IncludeEventHandler or a custom ResourceLoader.
> Either direction is likely to provide much better performance.
>

Thanks man.  Just what I needed to know.  I'll try the ResourceLoader route.

> On Wed, Mar 24, 2010 at 9:35 AM, ChadDavis <ch...@gmail.com> wrote:
>> I'm considering a use case where I re-init a velocityEngine with each
>> request in a web application.  Specifically, I'm re-configuring the
>> directories hit by a filesystem loader.  Is there any particular
>> reason to think that this would incur severe performance hits?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
>> For additional commands, e-mail: user-help@velocity.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Re: performance of init

Posted by Nathan Bubna <nb...@gmail.com>.
I don't know.  What you are planning is not recommended, and init has
not been subjected to much optimization, i can tell you that.  The
biggest hits, though are not likely to be the initialization itself so
much as the fact that a re-init will mean that you get little or no
use out of the template caching or class mapping.  If you are up to
the task, i would recommend trying to solve your particular problem
some other way.  The two most useful facilities for dynamic filesystem
challenges are an IncludeEventHandler or a custom ResourceLoader.
Either direction is likely to provide much better performance.

On Wed, Mar 24, 2010 at 9:35 AM, ChadDavis <ch...@gmail.com> wrote:
> I'm considering a use case where I re-init a velocityEngine with each
> request in a web application.  Specifically, I'm re-configuring the
> directories hit by a filesystem loader.  Is there any particular
> reason to think that this would incur severe performance hits?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
> For additional commands, e-mail: user-help@velocity.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org