Discard binary HTTP response bodies by default #845
Labels
enhancement
evaluation needed
proposal needs to be validated or tested before fully implementing it in k6
new-http
issues that would require (or benefit from) a new HTTP API
performance
Unless users have explicitly specified that they want to keep the body of a particular
http.batch()
request (i.e. have set itsresponseType
tobinary
ortext
) that returns a binary content-type, we probably should discard its response body. The actual body contents of things like images, videos and other binary files are very rarely actually needed, and discarding them would save a ton of memory whendiscardResponseBodies
isn't turned on.Some things to consider:
batch()
HTTP requests should probably also be treated the same way, both for consistency and to reduce the implementation complexityResponse
object for the response body's length, since we currently would loose it, and it may be a useful property forcheck
s.^image/.+|audio/.+|video/.+)$
(and maybe include some or all of theapplication/
MIME types)options
...The text was updated successfully, but these errors were encountered: