Avoid copying unused resolution history
This commit is contained in:
@@ -15,8 +15,13 @@ type resolutionInput struct {
|
||||
}
|
||||
|
||||
func newResolutionInput(metadata Metadata, final *document.Node, sources []SourceInfo) resolutionInput {
|
||||
frozen := cloneMetadata(metadata)
|
||||
frozen.effectivePaths = effectivePathIndex(final)
|
||||
frozen := Metadata{
|
||||
fields: make(map[string]FieldInfo, len(metadata.fields)),
|
||||
effectivePaths: effectivePathIndex(final),
|
||||
}
|
||||
for pointer, info := range metadata.fields {
|
||||
frozen.fields[pointer] = cloneFieldInfo(info)
|
||||
}
|
||||
indexed := make(map[string]SourceInfo, len(sources))
|
||||
for _, source := range sources {
|
||||
if source.ID == "" {
|
||||
|
||||
Reference in New Issue
Block a user