Reuse cached pointers when ordering resolution changes
This commit is contained in:
@@ -2,8 +2,9 @@ package engine
|
||||
|
||||
import (
|
||||
"cmp"
|
||||
"go.maximumdirect.net/configkit/internal/document"
|
||||
"slices"
|
||||
|
||||
"go.maximumdirect.net/configkit/internal/document"
|
||||
)
|
||||
|
||||
type documentDeltaKind uint8
|
||||
@@ -24,6 +25,10 @@ type documentDelta struct {
|
||||
func compareConfigurationValues(before, after *document.Node) []documentDelta {
|
||||
var deltas []documentDelta
|
||||
compareConfigurationValue(before, after, Path{}, &deltas)
|
||||
return sortDocumentDeltas(deltas)
|
||||
}
|
||||
|
||||
func sortDocumentDeltas(deltas []documentDelta) []documentDelta {
|
||||
type orderedDelta struct {
|
||||
delta documentDelta
|
||||
pointer string
|
||||
|
||||
Reference in New Issue
Block a user