Devolutions / devolutions-gateway

A blazing fast relay server adaptable to different protocols and desired levels of traffic inspection.
Apache License 2.0
67 stars 10 forks source link

perf(jetsocat,dgw): remove to_vec calls from JMUX implementation #973

Closed CBenoit closed 1 month ago

CBenoit commented 1 month ago

By removing a few to_vec() calls and reusing the Bytes buffer as-is, perfomance of JMUX proxy is increased by ~62.3%.

Performance was measured using iperf on local network.

JMUX proxy performance before this patch:

0.0000-10.0493 sec 8.21 GBytes 7.02 Gbits/sec

JMUX proxy performance after this patch:

0.0000-19.0245 sec 25.2 GBytes 11.4 Gbits/sec

This is still 78.6% slower than jetsocat regular TCP port forwarding.