8000 Reduce Body size by algesten · Pull Request #1065 · algesten/ureq · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Reduce Body size #1065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2025
Merged

Reduce Body size #1065

merged 1 commit into from
May 20, 2025

Conversation

algesten
Copy link
Owner

No description provided.

@algesten algesten force-pushed the fix/reduce-body-size branch from 1bb39c2 to 0c0f3c1 Compare May 20, 2025 19:57
8000 @algesten algesten requested a review from Copilot May 20, 2025 19:57
Copy link
@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR aims to reduce the overall Body size by updating various threshold values in the ensure! macro calls and modifying the BodyHandler usage to decrease the structure’s footprint.

  • Updated ensure! macro thresholds for RequestBuilder, Response, and Body in src/lib.rs
  • Introduced boxing for BodyHandler in src/body/mod.rs to reduce memory usage
  • Updated CHANGELOG.md to reflect the change

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/lib.rs Adjusted size thresholds for various types to lower body size
src/body/mod.rs Wrapped BodyHandler in Box for more efficient memory usage
CHANGELOG.md Added note indicating the body size reduction change
Comments suppressed due to low confidence (2)

src/lib.rs:1134

  • The threshold for Response has been significantly reduced from the previous value; please confirm that this new limit matches the intended behavior and that any dependent logic accounts for the change.
ensure!(Response<Body>, 250); // 136

src/body/mod.rs:100

  • Wrapping BodyHandler in a Box is appropriate to reduce the size of the Body struct, but please verify that all associated pattern matches and consumers are updated for this boxed type to prevent potential runtime issues.
Handler(Box<BodyHandler>),

@algesten algesten force-pushed the fix/reduce-body-size branch from 0c0f3c1 to db619b8 Compare May 20, 2025 20:02
@algesten algesten merged commit 50a1e90 into main May 20, 2025
70 checks passed
@algesten algesten deleted the fix/reduce-body-size branch May 20, 2025 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0