Skip to content

Remove recursive calls in Parser and print functions #17

@KaruroChori

Description

@KaruroChori

At the moment, parsing from XML and generating XML is handled by functions making use of recursion.
In theory the parser does not fall in the class of "tail recursion", so some types of documents can fail due to buffer overflows regardless of how much memory the system has. Dynamic allocation is probably the only way forward here.

The XML serialization on the other hand is using recursion out of convenience, but as the tree has full context for each node, we don't need a stack to navigate it. Hence, it can be optimized to operate with $$O\left (1\right )$$ .

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions