Skip to content
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

Apply fieldalignment fixes to optimize struct memory layout #974

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

pixel365
Copy link
Contributor

@pixel365 pixel365 commented Feb 5, 2025

This PR applies fieldalignment fixes to optimize struct memory layout. By rearranging struct fields, we reduce unnecessary padding and improve memory efficiency.

Changes:

  • Optimized struct alignment in middleware/throttle.go, middleware/wrap_writer.go, mux_test.go, and path_value_test.go.
  • Reduced overall struct sizes, leading to better memory usage.

These changes do not alter functionality but improve performance by reducing memory overhead.

Copy link
Contributor

@VojtechVitek VojtechVitek left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks.

@VojtechVitek VojtechVitek merged commit e846b83 into go-chi:master Feb 5, 2025
8 checks passed
@pixel365 pixel365 deleted the fieldalignment branch February 5, 2025 16:55
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.

2 participants