diff --git a/docs/caveats.md b/docs/caveats.md index eefe3ef10ee86357f049c735ff9bddcf8d3b9fa0..6ba5711a1436c01cddf16d2f6a3319d0e40c5c69 100644 --- a/docs/caveats.md +++ b/docs/caveats.md @@ -20,3 +20,10 @@ Note that YOU, when sending messages, should not use memoryviews. Pass proper by as required. _AMQPError_'s returned to you via futures will also have memoryviews as _reply_text_! + +It was considered whether to unserialize short fields, such as _routing_key_ or _exchange_, but it was decided against. +Creating a new memoryview carries at least much overhead as an empty string, but there's no need to copy. +Plus, it's not known whether you will use these strings at all! + +If you need to, you got memoryviews. Plus they support the \__eq__ protocol, which should cover most +use cases without even converting.