postwait / node-amqp

[UNMAINTAINED] node-amqp is an AMQP client for nodejs
MIT License
1.69k stars 357 forks source link

Reduce Buffer creation and copy on message send #274

Closed jbowes closed 10 years ago

jbowes commented 10 years ago

Rather than allocate new buffers for every frame, reuse buffers for frame start and frame end. Directly pass the caller's buffer to socket write instead of copying it first.

In my testing, this results in a 33% speedup for message sends.

jbowes commented 10 years ago

oops, might be something wrong with this. closing while i investigate.