Skip to content

Consider removing #parent from various Stupidedi::Schema #169

@kputnam

Description

@kputnam

Because nearly every definition has a #parent, simple elements that are the "leaves" of a tree are copied quite a lot. Specifically, once a SimpleElementDef becomes part of a SegmentDef, it's copied and potentially copied again when the SegmentDef is added to a grammar.

I'm not sure where the parents of various schema definitions are actually used, or if those uses are truly necessary. While I don't yet have memory profiler data, copying around a lot of SimpleElementDef and friends isn't free. It might be beneficial to remove #parent.

Note that #parent is not implemented on Stupidedi::Values because parents are tracked by using Stupidedi::Zipper, leaving the actual node unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions