Improve memory efficiency of noticesToBeSent by mapping pointers instead of WidNotice structs

This commit is contained in:
ChaoticByte 2025-06-12 17:23:08 +02:00
parent 295ceec3de
commit 9b00959fdb
No known key found for this signature in database
4 changed files with 8 additions and 7 deletions

View file

@ -25,7 +25,7 @@ type WidNotice struct {
PortalUrl string
}
func noticeSliceContains(notices []WidNotice, notice WidNotice) bool {
func noticeSliceContains(notices []*WidNotice, notice *WidNotice) bool {
for _, x := range notices {
if x.Uuid == notice.Uuid {
return true