From 7b0a08ae9d6f9e0de65ba960ff24fae18b52c89e Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Sun, 5 Nov 2017 11:05:28 +0000 Subject: [PATCH] memoise renderer passed to ConnectionJoin We do this here rather than in ConnectionJoin since that way it is obvious that the renderer isn't memoised already. --- render/pod.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/render/pod.go b/render/pod.go index 30c012c4a..28e3a9f67 100644 --- a/render/pod.go +++ b/render/pod.go @@ -62,7 +62,9 @@ var PodRenderer = Memoise(ConditionalRenderer(renderKubernetesTopologies, ), ), ), - ConnectionJoin(MapPod2IP, selectPodsWithDeployments{}), + // ConnectionJoin invokes the renderer twice, hence it + // helps to memoise it. + ConnectionJoin(MapPod2IP, Memoise(selectPodsWithDeployments{})), ), ), ))