mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-30 08:02:26 -05:00
[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
This commit is contained in:
parent
578a4e0cf5
commit
c06e6fb656
26 changed files with 1409 additions and 163 deletions
7
vendor/codeberg.org/gruf/go-structr/queue_ctx.go
generated
vendored
7
vendor/codeberg.org/gruf/go-structr/queue_ctx.go
generated
vendored
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue