You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by "Heyzi (via GitHub)" <gi...@apache.org> on 2026/08/09 07:41:14 UTC
[PR] GUACAMOLE-2318: Reduce write() overhead when encoding protocol instru… [guacamole-server]
Heyzi opened a new pull request, #704:
URL: https://github.com/apache/guacamole-server/pull/704
## GUACAMOLE-2318: Reduce write() overhead when encoding protocol instructions
Every field of a `guac_protocol_send_*()` instruction was written to the socket as its own separate call - for `copy` that's 30+ small locked writes per instruction. Now each `"<length>.<value>"` element is built into one buffer and written in a single call. Wire format is unchanged.
Also fixed: a `NULL` string passed to `__guac_socket_write_length_string()` used to crash guacd; now treated as empty, like the rest of libguac.
**Benchmarks** (real build, Linux/glibc, not synthetic):
- `copy`: ~1730 → ~1220 ns/call (-30%)
- `transform`: ~2020 → ~1610 ns/call (-20%)
- `name`: ~227 → ~205 ns/call (-10%)
CPU-only, no memory impact.
**Testing:** 79/79 existing unit tests pass; added a test covering boundary values (INT64_MIN/MAX, empty/NULL string, extreme doubles).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GUACAMOLE-2318: Reduce write() overhead when encoding protocol instru… [guacamole-server]
Posted by "necouchman (via GitHub) via dev" <de...@guacamole.apache.org>.
necouchman commented on PR #704:
URL: https://github.com/apache/guacamole-server/pull/704#issuecomment-6544568499
@Heyzi Please re-base this against the `main` branch - this seems more like a new feature and not a bug fix or patch.
@mike-jumper This looks reasonable to me, but I'm not nearly as familiar with the instruction parsing as you are, so not sure if this would cause any issues you can think of?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org