Closed neilalexander closed 4 weeks ago
This PR makes the following changes that should reduce allocations in consumers:
JSApiConsumerGetNextRequest
waitingRequest
MaxWaiting
hdr
jsPubMsg
Signed-off-by: Neil Twigg neil@nats.io
This PR makes the following changes that should reduce allocations in consumers:
JSApiConsumerGetNextRequest
structs are now pooled, as they were unavoidably escaping to the heap;waitingRequest
structs are now returned to the pool correctly if hittingMaxWaiting
;hdr
buffer from pooledjsPubMsg
when returning consumer errors to the client.Signed-off-by: Neil Twigg neil@nats.io