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

make IncomingCommand a class and simplify code around it #1628

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

bollhals
Copy link
Contributor

@bollhals bollhals commented Jul 5, 2024

Proposed Changes

Similar to the frame one, there's also just one Command at a time. So it can be allocated once and updated throughout the lifetime.
This way it can be changed to a class instead of struct, and thus avoids all the complexity of the struct handling especially with the async code.

Slight performance increase as well.

Method Mean Error StdDev Ratio Gen0 Allocated Alloc Ratio
Pr_Publish_Hello_World 275.2 ms 5.50 ms 8.57 ms 1.00 1000.0000 5.85 MB 1.00
Main_Publish_Hello_World 279.8 ms 5.55 ms 11.47 ms 1.00 1000.0000 5.84 MB 1.00

Types of Changes

  • Bug fix (non-breaking change which fixes issue #NNNN)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause an observable behavior change in existing systems)
  • Documentation improvements (corrections, new content, etc)
  • Cosmetic change (whitespace, formatting, etc)
  • Performance / simplification

Checklist

  • I have read the CONTRIBUTING.md document
  • I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
  • All tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in related repositories

Further Comments

I've changed a few things along the way

@lukebakken lukebakken requested review from lukebakken and stebet July 7, 2024 12:58
@lukebakken lukebakken self-assigned this Jul 7, 2024
@lukebakken lukebakken added this to the 7.0.0 milestone Jul 7, 2024
Copy link
Contributor

@lukebakken lukebakken left a comment

Choose a reason for hiding this comment

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

Thank you!

@lukebakken lukebakken merged commit e247e8b into rabbitmq:main Jul 8, 2024
11 checks passed
@bollhals bollhals deleted the fix/InboundCommand branch July 8, 2024 17:56
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