[ 
https://issues.apache.org/jira/browse/IBATIS-549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12641192#action_12641192
 ] 

Kai Grabfelder commented on IBATIS-549:
---------------------------------------

Feel free to attach a patch against the current ibatis trunk. Wishes with 
attached patches are more likely to be heard by the devs ;-)

> InlineParameterMapParser maintains the character string without the  
> necessity by using StringTokenizer. 
> ---------------------------------------------------------------------------------------------------------
>
>                 Key: IBATIS-549
>                 URL: https://issues.apache.org/jira/browse/IBATIS-549
>             Project: iBatis for Java
>          Issue Type: Wish
>          Components: SQL Maps
>            Reporter: Takahiro Kido
>            Priority: Minor
>
> To maintain the property value, InlineParameterMapParser uses StringTokenizer.
> StringTokenizer#nextToken uses String#substring(int start, int end).
> String#substring(int start, int end) uses String(int start, int length, 
> char[] data).
> ex) INSERT INTO TABLE_A(COL_1,COL_2,....COL_N) 
> VALUES(#VALUE_1#,#VALUE_2#,....,#VALUE_N#);
>       char[] data keeps "INSERT INTO TABLE_A(COL_1,COL_2,....COL_N) 
> VALUES(#VALUE_1#,#VALUE_2#,....,#VALUE_N#)".
> "INSERT INTO TABLE_A(COL_1,COL_2,....COL_N) VALUES("
> This character string need not be maintained. 
> When String passed to StringTokenizer is made the character string since '#' 
> of the first token, 
> it is settled with less amount of the heap use. 
> char[] data keeps "#VALUE_1#,#VALUE_2#,....,#VALUE_N#)".
> If the amount of the heap use is valued, you should make a new character 
> string since '#' of the first token with StringBuilder or StringBuffer 
> beforehand. 
> Because a lot of heaps are consumed oppositely when it is tried to make a 
> character string new in each token, this attempt is not suitable. 
> The effect of reducing the amount of the heap use concerning select and 
> insert statement can be chiefly expected. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to