orthecreedence / cl-async

Asynchronous IO library for Common Lisp.
MIT License
273 stars 40 forks source link

fix buffer stomping on itself when lots of requests are being handled #124

Closed nightshade427 closed 9 years ago

nightshade427 commented 9 years ago

see https://github.com/orthecreedence/cl-async/issues/122

nightshade427 commented 9 years ago

Im sure there is a better way to do this besides copying the buffer each time.

orthecreedence commented 9 years ago

I believe this is fixed in 78acb7df404eec677de6550dcc0111c9aa2aa7b0

Buffer copying seems to be the only way to go. The good news is that since we are now copying the buffer (instead of using *output-buffer*) we can just create a new static buffer that's the entire size of the given data and copy the data in one fell swoop (f15ff2e50348e23e36a09abb7bf726f14ffde09b). Seems to work faster than before.

nightshade427 commented 9 years ago

Nice!! Will test out later tonight :)