Commits

Charles Miller [Atlassian] (closed) committed aabd1b8

Add some nice initial sizes to the buffers

  • Participants
  • Parent commits ef67532
  • Branches xwork_1-0-3, xwork_1-0-3_branch

Comments (0)

Files changed (1)

File src/java/com/opensymphony/xwork/util/TextParseUtil.java

     public static String translateVariables(String string, final OgnlValueStack stack) {
         if (string == null)
             return null;
-        
+
         boolean lastWasDollar = false;
         int parenCount = 0;
-        StringBuilder out = new StringBuilder();
-        StringBuilder expression = new StringBuilder();
+        StringBuilder out = new StringBuilder(string.length() + 10);
+        StringBuilder expression = new StringBuilder(20);
 
         for (int i = 0; i < string.length(); i++)
         {