A sizable percentage of the cost of parsing is for
creating Strings that are part of the callback interfaces.
The cost can be reduced when strings are repeated (like
element and attribute names), by caching and re-using
Strings. But in cases where Strings are unlikely to be
reused, like attribute values, the cost is high in having
to return String objects. It would be nice if all instances
of String were replaced with a mutatable version of
String, so the implementation had the option not to
create new Strings. If the client needed a real
java.lang.String, they could call toString().
Unfortunately I'm not sure how this could be retrofitted
into the existing interfaces without breaking current
Maybe it would require alternate interfaces (a mirror set
of Interface2's) that break backward compatibility?