debasishg / scala-redis-nb

Implementation of a non blocking Redis client in Scala using Akka IO
204 stars 38 forks source link

Use Queue API instead of inefficient operations #102

Open okumin opened 10 years ago

okumin commented 10 years ago

In Scala 2.10.x, Queue#:+ has a performance issue. https://github.com/scala/scala/commit/f0f0a5e7813501d985174d3c5573c34c8a7608c6

So this commit replaces that operations with Queue#enqueue. And use Queue#dequeue explicitly instead of Queue#head and Queue#tail. There is little dirrerence between these operations, but it will be obvious that Queue is used correctly.

okumin commented 10 years ago

When I tried to request too many commands, Queue#:+ in ResponseHandling spent much time.

debasishg commented 10 years ago

Thanks .. I will take a look and merge ASAP.

okumin commented 10 years ago

I found another bottleneck……, so I'm going to fix that.

okumin commented 10 years ago

It is difficult to fix, so created the issue. https://github.com/debasishg/scala-redis-nb/issues/104