commit | 9a827f5f037f6b0f25f70f8d41ba9341ab7bf231 | [log] [tgz] |
---|---|---|
author | Eli Lipsitz <elipsitz@google.com> | Fri Jul 19 19:18:47 2024 +0000 |
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Jul 19 19:18:47 2024 +0000 |
tree | 29c03afad1f7b0f3f6168808edf31fd62de73267 | |
parent | f4e1dbc0aafcd5c1363fe21153028201ffd13972 [diff] |
pw_rpc_transport: Don't write empty header in StreamRpcFrameSender This commit slightly adjusts the behavior of StreamRpcFrameSender to avoid making a Write call for an empty RpcFrame header. This is a performance optimization, because some underlying streams might not treat a write of 0 as a no-op. With the common case of Hdlc framing, the header will always be empty. Tested: After this change, StreamRpcFrameSender with Hdlc framing Tested: no longer makes an empty write for each RpcFrame. Change-Id: Ic6d5589495d8c9c185993fd0c59e92b57876fe3e Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/220211 Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com> Commit-Queue: Eli Lipsitz <elipsitz@google.com> Reviewed-by: Alexei Frolov <frolv@google.com> Reviewed-by: Austin Foxley <afoxley@google.com>
Pigweed is an open source collection of embedded-targeted libraries–or as we like to call them, modules. These modules are building blocks and infrastructure that enable faster and more reliable development on small-footprint MMU-less 32-bit microcontrollers like the STMicroelectronics STM32L452 or the Nordic nRF52832.
For more information please see our website: https://pigweed.dev/.