serenity
serenity copied to clipboard
LibIPC: Don't prepend message size in post_message
In post_message, we copy the message buffer's data just to prepend a u32 size to it:
https://github.com/SerenityOS/serenity/blob/d3612216571f84e030cec675e0f05d297606edf7/Userland/Libraries/LibIPC/Connection.cpp#L63-L65
For large messages (looking at you LibWeb), this is a very expensive copy on each IPC message
We should reserve space at the front of the buffer and splat the size in just before sending.