Integrate ACL with publishers for background event dispatch, ensure proper buffer adjustments in event encoding, and enhance follows sync with event delivery logic.

This commit is contained in:
2025-09-12 16:36:22 +01:00
parent bc1527e6cf
commit 098595717f
3 changed files with 20 additions and 5 deletions

View File

@@ -121,7 +121,7 @@ func (ev *E) Marshal(dst []byte) (b []byte) {
// integrates properly with the buffer pool, reducing GC pressure and
// avoiding new heap allocations.
if cap(b) < len(b)+len(ev.Content)+7+256+2 {
b2 := make([]byte, len(b)+len(ev.Content)*2+512)
b2 := make([]byte, len(b)+len(ev.Content)*2+1024)
copy(b2, b)
b2 = b2[:len(b)]
// return the old buffer to the pool for reuse.