donotturnoff / aerend

My third year project
0 stars 0 forks source link

Switch to two `send_from`s at some buffer/string size #164

Open donotturnoff opened 2 years ago

donotturnoff commented 2 years ago

In ae_set_picture_data and other functions which send strings, the string/buffer is entirely copied into the send buffer on the stack to avoid multiple syscalls. However, at some size this will probably have worse performance, so the code should switch to two syscalls, one for the stack send buffer, and one to send directly from the buffer/string. This could be configurable at compile-time.