ansible/receptor

Recent change wastes 8 bytes per packet

ghjm opened this issue · 2 comments

ghjm commented

I just happened to be looking at the Netceptor code, and noticed:

ServiceSizeinBytes = 8 + len(ServicePrefix)

It appears that eight bytes have been added to the Netceptor protocol header, to store the string svc- for the to and from service name. Note that these bytes are part of a fixed-length protocol header that must fit within the network MTU, normally 1500 bytes. Adding eight bytes to this header makes Receptor half a percent slower (or worse for smaller MTUs), for no benefit that I can see.

If you want the services names to be displayed as "svc-whatever" then this should be handled in the API or the display code - it shouldn't be done at the protocol level.

CC @john-westcott-iv @shanemcd

Good call, I should have caught this. We'll get that change reverted. cc @john-westcott-iv

Reverted in #534