rabbitmq-dotnet-client
rabbitmq-dotnet-client copied to clipboard
make IncomingCommand a class and simplify code around it
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)
- [x] Performance / simplification
Checklist
- [x] I have read the
CONTRIBUTING.md
document - [x] I have signed the CA (see https://cla.pivotal.io/sign/rabbitmq)
- [x] 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