Hello Jason,
[SNIP]
> I actually don't like the idea of changing something so fundamental but
> I would be curious if you tried any profiling to see if there was any
> performance difference between using a visitor and the self-walking
> tree.
I think visitor and self-rendering can coexist. I write the patch because I
use something like:
template.merge ( context, writer );
template.merge ( context,
new org.apache.velocity.runtime.visitor.NodeViewMode() );
...
I think about coding a AST node visitor for Smalltalk code generation
equivalent with templates. I don't know if it's a good idea, I only
experimentize a little.
Please tell me the way you use
org.apache.velocity.runtime.visitor.NodeViewMode ...
I don't plan comparing (profiling) visitor with self-walking, I think both
methods are equal (from the speed point of view). Personally, I think a
visitor is better if you have many walking methods because in this way you
don't poluate the nodes with code ...
A interesting question for me is if "compiled" templates are faster than
"normal" templates, but actually I don't know what "compiled" templates
should be :-)
Christian
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>