Ring buffers #12
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Chewing_Bever/lnm#12
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
The read/write buffers for requests currently using
memmove
to move data to the front of the buffer, so the back can be reused for a subsequent read/write call. This works, but isn't the most efficient it can be, as it requires moving the data after every syscall.An alternative to this would be using circular buffers. One disadvantage of this would be that syscalls could get split up into two (e.g. one read to fill the end of the array, then another to fill the part in front) but this performance decrease might not be too much of an issue, assuming the switch to circular buffers compensates for it. If we'd really like to go all out, we could instead start using
recvmsg
andsendmsg
which can be instructed to write to multiple buffers. This way, we could write to the circular buffer using a single syscall.