thegeez/clj-browserchannel — pull request #5 by vdichev (2012-05-24 05:22:28+00:00)
Title: Performance

Refactor buffer data structures for performance and readability.

Now there are two queues- `to-flush-buffer`, and `to-acknowledge-buffer`.
* `send-string` pushes the array to both
* `acknowledge-arrays` truncates `to-acknowledge-buffer`, and assigns it to `to-flush-buffer`.
* `flush-buffer` uses `to-flush-buffer` and assigns it an empty queue on success.

Overall this should be not only faster, but easier to understand.