Skip to content

Commit

Permalink
Performance Improvement
Browse files Browse the repository at this point in the history
[git-p4: depot-paths = "//open/mondrian/": change = 443]
  • Loading branch information
Andreas Voss committed Apr 25, 2003
1 parent 1cdff92 commit 79d2c12
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions src/main/mondrian/olap/ExpBase.java
Expand Up @@ -208,17 +208,20 @@ private static String getTypeDescription(int type) {
return "<" + Category.instance.getDescription(type & Category.Mask) + ">";
}

private static String getTypeDescriptionCommaList(int[] types, int start)
{
String s = "";
for (int i = start; i < types.length; i++) {
if (i > start) {
s += ", ";
}
s += getTypeDescription(types[i]);
}
return s;
}
private static String getTypeDescriptionCommaList(int[] types, int start)
{
int initialSize = (types.length - start) * 16;
StringBuffer sb = new StringBuffer(initialSize > 0 ? initialSize : 16);
for (int i = start; i < types.length; i++) {
if (i > start) {
sb.append(", ");
}
sb.append("<")
.append(Category.instance.getDescription(types[i] & Category.Mask))
.append(">");
}
return sb.toString();
}

public static void unparseList(
PrintWriter pw, Exp[] exps, String start, String mid, String end,
Expand Down

0 comments on commit 79d2c12

Please sign in to comment.