Open
Description
The current implementation of the req.accepts
, req.acceptsEncodings
, and req.acceptsEncoding
methods in lib/request.js creates a new accepts
instance for each call.
Am I correct to think that this can lead to redundant object creation and parsing overhead, especially in scenarios where these methods are called multiple times within the same request lifecycle?
If caching the accepts
instance seems correct to reduce overhead and help with faster execution, I am willing to create PR and benchmark comparisons for this. However, since I have very little idea about the overall scenario I need a confirmation of go / no go.