[ 
https://issues.apache.org/jira/browse/VELOCITY-664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12660594#action_12660594
 ] 

Jarkko Viinamäki commented on VELOCITY-664:
-------------------------------------------

I don't like this change. 

Although this change may decrease memory usage a bit (did you measure how 
much?) it creates a new performance penalty. This is because 
java.io.Writer.write(String) does internally String.getChars call which 
requires System.arrayCopy.

That is certainly slower than doing direct java.io.Writer(char[]) which has no 
overhead.

Strings are stored as char arrays for performance reasons.

> Unnecessary double storing of template text
> -------------------------------------------
>
>                 Key: VELOCITY-664
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-664
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Engine
>            Reporter: Byron Foster
>
> ASTText makes a copy of the token image and uses the copy to render.  This 
> means that ASTText keeps two copies of the text.  In the majority of cases 
> ASTText can use the token image.

-- 
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]

Reply via email to