File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -86,8 +86,9 @@ func (el *EventLoop) Start(ctx context.Context) error {
8686 // Handle the current batch if no batch is being handled.
8787 if ! handling {
8888 go handle (ctx , batch )
89- // FIXME(pleshakov): Making an entirely new, zero-length slice seems unnecessary and potentially inefficient.
90- // See https://github.com/nginxinc/nginx-kubernetes-gateway/pull/175#discussion_r946167207
89+ // FIXME(pleshakov): Making an entirely new buffer is inefficient and multiplies memory operations.
90+ // Use a double-buffer approach - create two buffers and exchange them between the producer and consumer
91+ // routines. NOTE: pass-by-reference, and reset buffer to length 0, but retain capacity.
9192 batch = make ([]interface {}, 0 )
9293 handling = true
9394 }
You can’t perform that action at this time.
0 commit comments