mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 01:31:17 +00:00
optimization: generate children counts on demand
Accumulating counts in the Node data structure takes a lot of effort, and it turns out we only use this information in a few places where it's easy to compute.
This commit is contained in:
@@ -193,9 +193,6 @@ func (ret *joinResults) addUnmappedChild(m report.Node, id string, topology stri
|
||||
result = report.MakeNode(id).WithTopology(topology)
|
||||
}
|
||||
result = result.WithChildID(m.ID)
|
||||
if m.Topology != report.Endpoint { // optimisation: we never look at endpoint counts
|
||||
result = result.AddCounter(m.Topology, 1)
|
||||
}
|
||||
ret.nodes[id] = result
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user