Skip to content

Commit da625e2

Browse files
authored
Use single node struct, instead of interfaces, in NodeTreeModel (#43835)
### What does this PR do? Instead of having interfaces for leaf and inner nodes, combine the nodes into a single struct type, and remove interfaces entirely from within the data structure. ### Motivation Improves performance significantly, since we're not allocating interfaces nor dispatching on them. ### Describe how you validated your changes Made a microbenchmark that just sets up the config in a standalone binary. Unit tests ensure that functionality continues to work properly. ### Additional Notes Co-authored-by: dustin.long <dustin.long@datadoghq.com>
1 parent bb4aafd commit da625e2

File tree

130 files changed

+536
-987
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+536
-987
lines changed

comp/core/config/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ require (
7575
go.uber.org/dig v1.19.0 // indirect
7676
go.uber.org/multierr v1.11.0 // indirect
7777
go.uber.org/zap v1.27.0 // indirect
78-
golang.org/x/exp v0.0.0-20251113190631-e25ba8c21ef6 // indirect
7978
golang.org/x/net v0.47.0 // indirect
8079
golang.org/x/sync v0.18.0 // indirect
8180
golang.org/x/sys v0.38.0 // indirect

comp/core/config/go.sum

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

comp/core/configsync/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ require (
9292
go.uber.org/multierr v1.11.0 // indirect
9393
go.uber.org/zap v1.27.0 // indirect
9494
go.yaml.in/yaml/v2 v2.4.3 // indirect
95-
golang.org/x/exp v0.0.0-20251113190631-e25ba8c21ef6 // indirect
9695
golang.org/x/net v0.47.0 // indirect
9796
golang.org/x/sync v0.18.0 // indirect
9897
golang.org/x/sys v0.38.0 // indirect

comp/core/configsync/go.sum

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

comp/core/ipc/httphelpers/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ require (
8383
go.uber.org/fx v1.24.0 // indirect
8484
go.uber.org/multierr v1.11.0 // indirect
8585
go.uber.org/zap v1.27.0 // indirect
86-
golang.org/x/exp v0.0.0-20251113190631-e25ba8c21ef6 // indirect
8786
golang.org/x/net v0.47.0 // indirect
8887
golang.org/x/sync v0.18.0 // indirect
8988
golang.org/x/sys v0.38.0 // indirect

comp/core/ipc/httphelpers/go.sum

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

comp/core/ipc/impl/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ require (
8484
go.uber.org/fx v1.24.0 // indirect
8585
go.uber.org/multierr v1.11.0 // indirect
8686
go.uber.org/zap v1.27.0 // indirect
87-
golang.org/x/exp v0.0.0-20251113190631-e25ba8c21ef6 // indirect
8887
golang.org/x/net v0.47.0 // indirect
8988
golang.org/x/sync v0.18.0 // indirect
9089
golang.org/x/sys v0.38.0 // indirect

comp/core/ipc/impl/go.sum

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

comp/core/ipc/mock/go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ require (
8080
go.uber.org/fx v1.24.0 // indirect
8181
go.uber.org/multierr v1.11.0 // indirect
8282
go.uber.org/zap v1.27.0 // indirect
83-
golang.org/x/exp v0.0.0-20251113190631-e25ba8c21ef6 // indirect
8483
golang.org/x/net v0.47.0 // indirect
8584
golang.org/x/sync v0.18.0 // indirect
8685
golang.org/x/sys v0.38.0 // indirect

comp/core/ipc/mock/go.sum

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)