Optimize parsing of Attributes
Created by: skreutzer
If attributes aren't used, the parser still reads them and creates the attribute list in memory. This is probably unavoidable, because attributes must be read before the the end of the tag can be discovered. There's no need however to construct Attribute objects in memory if they will never be used. One way to optimize it could be to just store the characters until the end of the tags temporarily and only interpret them when an attribute is actually requested, but that could be of similar expense in terms of processing time and memory as the current method of parsing and constructing the objects. Another way could be an extension to the StAX API to specify for which elements Attributes need to be loaded (default to all, until a specific policy is set).