From e6bbf07089dcbe43c05d84f3ac9f47d057341b59 Mon Sep 17 00:00:00 2001 From: Raja Subramanian Date: Mon, 19 Dec 2022 22:37:34 +0530 Subject: [PATCH] Comment out memstats worker. (#1239) --- pkg/routing/localrouter.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pkg/routing/localrouter.go b/pkg/routing/localrouter.go index 97eb640a8..1e5891711 100644 --- a/pkg/routing/localrouter.go +++ b/pkg/routing/localrouter.go @@ -2,7 +2,6 @@ package routing import ( "context" - "runtime" "sync" "time" @@ -176,7 +175,7 @@ func (r *LocalRouter) Start() error { return nil } go r.statsWorker() - go r.memStatsWorker() + // go r.memStatsWorker() // on local routers, Start doesn't do anything, websocket connections initiate the connections go r.rtcMessageWorker() return nil @@ -207,6 +206,7 @@ func (r *LocalRouter) statsWorker() { } } +/* func (r *LocalRouter) memStatsWorker() { ticker := time.NewTicker(time.Second * 30) defer ticker.Stop() @@ -220,10 +220,9 @@ func (r *LocalRouter) memStatsWorker() { "mallocs", m.Mallocs, "frees", m.Frees, "m-f", m.Mallocs-m.Frees, "hinuse", m.HeapInuse, "halloc", m.HeapAlloc, "frag", m.HeapInuse-m.HeapAlloc, ) - - runtime.GC() } } +*/ func (r *LocalRouter) rtcMessageWorker() { // is a new channel available? if so swap to that one