floodlight/indigo — pull request #145 by rlane (2014-06-12 05:57:27+00:00)
Title: Convert OFConnectionManager write queue to a ringbuffer

Reviewer: @kenchiang

The linear-time list append dominated all other message processing when the write queue got too long. The ringbuffer is O(1) for append. It also puts a hard limit on the number of queued messages.

I recommend looking at https://github.com/rlane/indigo/commit/788515255c810b8822cef4785bb308da7c33bd80?w=1 for the third commit, which ignores whitespace. This commit removes the arbitrary limit of 32 messages sent per tick, greatly reducing the number of drops when sending lots of async messages.