Paulo Gaspar wrote:
> > This icache stuff isn't global. You understand that, right?
> >
> > geir
>
> Why not?
> =:o)
>
> Paulo
Reviewing the code should help with that one, but the basic idea is that
a template in AST form can be shared by multiple thread, each with a
different set of data in the contexts used byt those threads. Since the
information that we are caching is therefore specific to the context, a
global cache makes no sense. You could make some kind of thread local
storage, or a central caching resource that expires stuff etc, etc,, but
there was no need for that kind of machinery. Yes, there is a global
introspector cache (which we don't actually use in Foreach now with the
latest changes), but once we do the expensive 'instanceof' (or before,
once we do the expensive and potentially blocking introspection), there
is no need to keep doing that. Hence, the cache. Results in quite a
performance improvement.
geir
--
Geir Magnusson Jr. [EMAIL PROTECTED]
Velocity : it's not just a good idea. It should be the law.
http://jakarta.apache.org/velocity