Bugzilla – Bug 1320
Use writev in EmuNetDevice (possible performance improvement idea)
Last modified: 2011-12-22 09:45:11 UTC
I just had crazy idea that could improve the EmuNetDevice performance a bit. Not sure if it us feasible, but wanted to note the idea somewhere before I forget. Currently, to transmit a packet, EmuNetDevice does packet->CopyData, to copy data to another buffer, and then calls sendto(). Would it possible to implement a Copy-less serialization mechanism that used struct iovec and writev() instead? We would need a new Packet method that returned an array of iovec, which points to its own internal data buffers, instead of copying the data elsewhere. As a result, less data would need to be copied, for the transmission case.