commit | d60177e600493d24587171d01dfcfd408fe17a0a | [log] [tgz] |
---|---|---|
author | Christopher Speck <die.drachen@gmail.com> | Mon Apr 24 12:08:59 2023 -0400 |
committer | Christopher Speck <die.drachen@gmail.com> | Thu May 18 12:35:06 2023 -0400 |
tree | cb64322eb46e992779f5eb680ea768220c3bab6a | |
parent | cc50915c1da956f24df5637353bef67e9103527d [diff] |
GUACAMOLE-1776: Batch up base64 encoding to reduce syscalls. This introduces a buffer for binary data to be encoded as base64 as well as a buffer for the base64 encoded data, prior to any attempt to writing it to the socket. Doing this significantly reduces the number of system calls made by the socket-fd implementation. Instead of `clock_gettime`, `pthread_mutex_rdlock`, and `pthread_mutex_unlock` being called for every 3 bytes it's now called for every ~768 bytes.