Skip to content

Don't decompress responses by default #6388

@jgaalen

Description

@jgaalen

Use case

When an HTTP Response is received, it is always decompressed before storing it in the 'responseData'. This is a waste of cpu and memory resources in the majority of the cases when the responseData is never used. Especially for heavy javascript and stylesheets, it can be a waste when the response isn't used for an extractor or assertion.

Imagine how much memory can be saved if we store the compressed content and don't decompress by default, and only decompress when the responseData is accessed. We could even safe more memory if we never store the response headers and body if the result isn't used.

Possible solution

Best solution:
Check if a sampler has extractor or assertion, only then decompress and store response data (header and body)

Improved solution
In case it is hard to detect whether the result will be accessed by code (jsr223, preprocessor of subsequent sampler etc), we can store the response data as is without decompressing upfront. In case the response data is accessed, then it should be decompressed.

We can even consider not storing the response data by default and use a flag on the sampler if we need to store it because future code need to access the data.

Possible workarounds

No response

JMeter Version

5.6.3

Java Version

OS Version

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions