[
https://issues.apache.org/jira/browse/VELOCITY-663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12660584#action_12660584
]
Byron Foster commented on VELOCITY-663:
---------------------------------------
#stop has been re-implemented so that it terminates execution as well as
rendering of the template. this also removes all of the getAllowRendering()
methods that were causing performance issues. And, the code base is smaller to
boot! #stop was implemented similar to #break such that a Throwable is thrown
from the ASTStop node.
> getAllowRendering() performance bottleneck
> ------------------------------------------
>
> Key: VELOCITY-663
> URL: https://issues.apache.org/jira/browse/VELOCITY-663
> Project: Velocity
> Issue Type: Improvement
> Components: Engine
> Reporter: Byron Foster
>
> getAllowRendering() methods which wraps all calls to the writer within the
> ASTNode renders and account for 11% of the time. I'm a little surprised by
> this because it just returns a member, but it may be due to the multiple
> layers of delegates and interfaces. From what I can tell, the purpose of
> this method is to serve the #stop directive (which the documentation claims
> is for debugging). I've always thought that #stop stopped execution of the
> script, but it doesn't, it continues executing the script and doesn't write
> anything to the writer, Yikes. I wonder if this shouldn't be implemented
> like #break, by throwing an exception which is caught at the top. Execution
> of the script would stop, and getAllowRendering could be removed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]