Details
-
Task
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
Description
If the client and server are using protocol with compression the server calls my_uncompress() from my_net_read_packet_reallen() — for every incoming packet. And my_uncompress() calls malloc() and then free(). Again, every single time.
It might be beneficial to get rid of this and use a preallocated buffer instead.
It calls my_malloc() from net_real_write(), then calls my_compress() which calls my_malloc() again. And inflate/deflate in zlib allocate lots of internal structure too.