-
Notifications
You must be signed in to change notification settings - Fork 141
Open
Labels
Description
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.
Reactions are currently unavailable