Skip to content
This repository has been archived by the owner on Jun 16, 2018. It is now read-only.

Optimize parsing of Attributes #8

Open
skreutzer opened this issue Jan 30, 2018 · 0 comments
Open

Optimize parsing of Attributes #8

skreutzer opened this issue Jan 30, 2018 · 0 comments

Comments

@skreutzer
Copy link
Member

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).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant