Commit f9dc4138 authored by Robert Ricci's avatar Robert Ricci
Browse files

Performance. Removed another use of an STL structure, and replaced it

with a simple malloc()ed buffer, which cut about 20% off our CPU

Note, this could probably even be put into a statically-sized
structrure, but Jon would have to verify this.
parent bda1131f
......@@ -435,10 +435,11 @@ void replayWritePacket(PacketInfo * packet)
bool success = replayWrite(headBuffer, Header::headerSize);
if (success)
vector<char> packetBuffer;
char *packetBuffer;
packetBuffer = static_cast<char*>(malloc(head.size));
savePacket(& packetBuffer[0], *packet);
replayWrite(& packetBuffer[0], head.size);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment