BeaconServers / Beacon-Backend

1 stars 0 forks source link

Compression of port numbers #2

Closed billyb2 closed 3 years ago

billyb2 commented 3 years ago

A very minor optimization we could do is by sending all numbers in hexadecimal. For example, when sending the port numbers of he's, instead of sending 1000. We could send 3E8 (without the 0z at the beginning since it'd save 2 bytes.) Hell, we could ditch http all together and write our own custom protocol to use as few bytes as possible. This would help immensely w. scaling, as while saving a couple bytes isn't much, when sending hundreds of thousands of requests, it grows massively. Instead of writing our own protocols, we can simply use hex for numbers sent instead.

billyb2 commented 3 years ago

Closing, this definitely isn't worth the processing to save a few bytes.