Hi,
Running the a test over the (with the new -advanced-telemetry option) shows
that GC is the biggest issue and I assume that because of the many temporary
objects created when doing string+= string? getClassInfo is next, followed by
the various global describeType/describeMetaData, internalToString, internal
XML methods, Qname.toString and newline method (see below). There not a lot of
cacheing going on which seems odd when you would expect most of the messages
going back and forth to involve the same types.
Does anyone know why it's printing out transients by default? IncludeTransients
is not set so defaults to true via some suspect logic ie doesn't check if
property exists.
And I'm sure there a more performant way of writing this (used for removed
duplicates from an array):
propertyNames.sort(Array.CASEINSENSITIVE |
(numericIndex ? Array.NUMERIC : 0));
// remove any duplicates, i.e. any items that can't be distingushed by
toString()
length = propertyNames.length;
for (i = 0; i < length - 1; i++)
{
// the list is sorted so any duplicates should be adjacent
// two properties are only equal if both the uri and local name are
identical
if (propertyNames[i].toString() == propertyNames[i + 1].toString())
{
propertyNames.splice(i, 1);
i--; // back up
}
}
And this (it used for indenting every line)
private static function newline(str:String, length:int = 0):String
{
var result:String = str;
result += "\n";
for (var i:int = 0; i < length; i++)
{
result += " ";
}
return result;
}
Anyone have to have a try and making it a bit quicker?
Thanks,
Justin