Optimized send message allocations.

For empty write queue cases, it is possible to avoid allocation and enqueue
send message structures.  Send message initialized on stack and passed to
write handler.  If immediate write fails, send message allocated from engine
pool and enqueued.
This commit is contained in:
Max Romanov
2017-10-04 14:59:35 +03:00
parent 6a64533fa3
commit ebbe89bd5c
2 changed files with 103 additions and 43 deletions

View File

@@ -118,8 +118,6 @@ typedef struct {
nxt_port_msg_t port_msg;
nxt_work_t work;
nxt_event_engine_t *engine;
nxt_mp_t *mem_pool;
} nxt_port_send_msg_t;