From c06e6fb6561595adc80ce5191640ae442771d45c Mon Sep 17 00:00:00 2001 From: kim <89579420+NyaaaWhatsUpDoc@users.noreply.github.com> Date: Mon, 13 May 2024 08:05:46 +0000 Subject: [performance] update go-structr and go-mutexes with memory usage improvements (#2909) * update go-structr and go-mutexes with memory usage improvements * bump to go-structr v0.8.4 --- vendor/codeberg.org/gruf/go-structr/queue_ctx.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'vendor/codeberg.org/gruf/go-structr/queue_ctx.go') diff --git a/vendor/codeberg.org/gruf/go-structr/queue_ctx.go b/vendor/codeberg.org/gruf/go-structr/queue_ctx.go index 766644c3c..3d15e619c 100644 --- a/vendor/codeberg.org/gruf/go-structr/queue_ctx.go +++ b/vendor/codeberg.org/gruf/go-structr/queue_ctx.go @@ -73,9 +73,10 @@ func (q *QueueCtx[T]) Debug() map[string]any { m["indices"] = indices for i := range q.indices { var n uint64 - for _, list := range q.indices[i].data { - n += uint64(list.len) - } + q.indices[i].data.Iter(func(_ string, l *list) (stop bool) { + n += uint64(l.len) + return + }) indices[q.indices[i].name] = n } q.mutex.Unlock() -- cgit v1.2.3