You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Because nearly every definition has a
#parent
, simple elements that are the "leaves" of a tree are copied quite a lot. Specifically, once aSimpleElementDef
becomes part of aSegmentDef
, it's copied and potentially copied again when theSegmentDef
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 onStupidedi::Values
because parents are tracked by usingStupidedi::Zipper
, leaving the actual node unchanged.The text was updated successfully, but these errors were encountered: