优化事件-减少GC

This commit is contained in:
boyce
2020-11-02 16:50:45 +08:00
parent c98de9b1e9
commit 060095baea
2 changed files with 10 additions and 12 deletions

View File

@@ -130,7 +130,7 @@ func (s *Service) Run() {
if s.profiler!=nil {
analyzer = s.profiler.Push(fmt.Sprintf("[Event]%d", int(ev.Type)))
}
s.eventProcessor.EventHandler(ev)
s.eventProcessor.EventHandler(&ev)
if analyzer!=nil {
analyzer.Pop()
analyzer = nil