The actual fix here is initializing initialFragment earlier so that its initially assigned value isn't an already mutated schema fragment.
Unsure whether this will help with the tricky spec, since allOf merging might be the bottleneck now
The other change is mostly a little optimization to abort quickly if the resolved fragment has been already processed.
Related to https://github.com/stoplightio/json-schema-tree/issues/19
The actual fix here is initializing
initialFragment
earlier so that its initially assigned value isn't an already mutated schema fragment. Unsure whether this will help with the tricky spec, sinceallOf
merging might be the bottleneck nowThe other change is mostly a little optimization to abort quickly if the resolved fragment has been already processed.