The temporary leak is occurring in the request handler. <-time.After() is not garbage-collected before expiration and shouldn't be used in such a frequently called method.
The second memory leak is permanent, caused by the timer not being closed, causing a slow increase in memory consumption over time.
Performance profile (done on ~1000 API calls using the Stream API):
Fixed memory leaks in GoVPP core stream and request handler.
Edit: the second issue was already addressed in https://github.com/FDio/govpp/pull/182
The temporary leak is occurring in the request handler.
<-time.After()
is not garbage-collected before expiration and shouldn't be used in such a frequently called method.The second memory leak is permanent, caused by the timer not being closed, causing a slow increase in memory consumption over time.
Performance profile (done on ~1000 API calls using the Stream API):
With the fix: