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

improve basic properties read / write #1100

Merged
merged 1 commit into from
Oct 20, 2021

Conversation

bollhals
Copy link
Contributor

Proposed Changes

Improves the read / write of basic properties performance by changing when to read / write the presence bits.

Method When Runtime Mean Error StdDev Gen 0 Code Size Allocated
BasicPropertiesRead Before .NET Core 3.1 66.39 ns 0.428 ns 0.400 ns 0.0408 3,085 B 192 B
BasicPropertiesRead After .NET Core 3.1 63.28 ns 0.485 ns 0.453 ns 0.0408 2,588 B 192 B
BasicPropertiesWrite Before .NET Core 3.1 40.23 ns 0.044 ns 0.039 ns - 2,200 B -
BasicPropertiesWrite After .NET Core 3.1 34.88 ns 0.089 ns 0.084 ns - 1,881 B -
BasicPropertiesRead Before .NET Framework 4.8 116.48 ns 0.490 ns 0.458 ns 0.0424 6,750 B 201 B
BasicPropertiesRead After .NET Framework 4.8 111.27 ns 0.227 ns 0.213 ns 0.0424 6,118 B 201 B
BasicPropertiesWrite Before .NET Framework 4.8 62.54 ns 0.155 ns 0.145 ns - 3,333 B -
BasicPropertiesWrite After .NET Framework 4.8 59.23 ns 0.155 ns 0.145 ns - 2,960 B -

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)

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

@michaelklishin
Copy link
Member

michaelklishin commented Oct 19, 2021

This runs RabbitMQ nodes into parser exceptions, try it:

dotnet test projects/Unit -f netcoreapp3.1 --filter "FullyQualifiedName~RabbitMQ.Client.Unit.TestFloodPublishing"

and main does not:

Passed!  - Failed:     0, Passed:     2, Skipped:     0, Total:     2, Duration: 57 ms

Obviously RabbitMQ's protocol parser hasn't changed in years.

@bollhals
Copy link
Contributor Author

Ah found a bug in my implementation when it the rented arrays were not zeroed. Should be fine now.

@michaelklishin michaelklishin merged commit 9922bc1 into rabbitmq:main Oct 20, 2021
@michaelklishin
Copy link
Member

Thank you!

@bollhals bollhals deleted the improvBasicProperties branch October 20, 2021 10:23
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