Remove unused history document copies
This commit is contained in:
@@ -109,14 +109,13 @@ func publishLoadResult[T any](schema *schemaDescriptor, definition Definition[T]
|
||||
}
|
||||
decoded, metadata := resolved.decoded, resolved.metadata
|
||||
final, applications, resolutionSnapshots := resolved.final, resolved.applications, resolved.snapshots
|
||||
structuralInput := document.Clone(resolved.structuralInput)
|
||||
preCLI := document.Clone(resolved.preCLI)
|
||||
allApplications := append(cloneHistoryApplications(applications), cloneHistoryApplications(resolved.postDecodeApps)...)
|
||||
finalizeMetadataPaths(&metadata, final, allApplications, decoded.baseline, resolved.structuralInput, resolved.preCLI, decoded.final)
|
||||
secrets := classifySecretPathsWithEvidence(schema, definition.Secret, metadata, final, allApplications, resolved.versionEvidence, decoded.baseline, resolved.structuralInput, resolved.preCLI, decoded.final)
|
||||
sources := sourceInfosWithVersionEvidence(accumulator.sources, resolved.versionEvidence, secrets, false)
|
||||
retainedTrees := make([]*document.Node, 0, len(allApplications)+5)
|
||||
retainedTrees = append(retainedTrees, decoded.final, final, structuralInput, preCLI)
|
||||
retainedTrees := make([]*document.Node, 0, len(allApplications)+4)
|
||||
retainedTrees = append(retainedTrees, decoded.final, final, preCLI)
|
||||
for _, application := range allApplications {
|
||||
retainedTrees = append(retainedTrees, application.value)
|
||||
}
|
||||
@@ -128,7 +127,6 @@ func publishLoadResult[T any](schema *schemaDescriptor, definition Definition[T]
|
||||
baseline: decoded.baseline,
|
||||
input: decoded.final,
|
||||
inputOrigins: cloneOriginIndex(decoded.origins),
|
||||
structuralInput: structuralInput,
|
||||
preCLI: preCLI,
|
||||
preCLIOrigins: cloneOrigins(resolved.preCLIOrigins),
|
||||
postDecodeApps: cloneHistoryApplications(resolved.postDecodeApps),
|
||||
|
||||
Reference in New Issue
Block a user