Skip to content

Track PR #2521: reduce httpx response memory footprint #2522

Closed

Description

@coderabbitai

Summary

Track the work proposed in PR #2521 to reduce httpx memory usage by:

  • removing redundant response body copies
  • lowering the default response read size to 50 MB
  • preserving raw and decoded response-body behavior
  • adding regression coverage for response-memory behavior and body metrics

Rationale

PR #2521 aims to reduce peak memory consumption in response handling without regressing decoding behavior, raw body access, or body-derived metrics.

Affected areas

  • common/httpx/httpx.go
  • common/httpx/option.go
  • common/httpx/response_memory_test.go
  • README.md

Acceptance criteria

  • The default response read size is updated to 50 MB and documentation reflects the new default.
  • Redundant response body copies are removed from the response handling path.
  • Raw response bytes remain available where required, including when decoded data differs from raw bytes.
  • Existing or added tests cover raw body handling, decoded body handling, and word/line metric behavior.
  • The change is tracked against PR reduce memory #2521 for review and follow-up.

Backlinks

Activity

  1. linked a pull request that will close this issuereduce memory #2521on Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions