kurokikaze/limestone — Issue #20: Performance issues with chunked response
Author: darklow
Created: 2012-01-12 19:28:28+00:00
State: open

We are building autocompletion using nodejs, sphinx and trying out limestone.

Autocompletion containts only 6 items
Everything works perfect except one performance issue.

When searching we use limit: 6, so we need quite small amount of data to return.
Sphinx returns results in average time from 1 - 9ms

However with header Transfer-Encoding': 'chunked. it takes browser 180-200 ms to receive data. And it is huge time loss for us.
If i turn off chunked header, then browser recieved data in 10-16ms, which id perfect and desired result, but the response is not complete if headers ar not specified as chunked.

If i take full response data as string from chunked result and send it directly as body, then it also takes 10-16ms. So the problem is definately in that chunked data output or buffering.

Is there any way to output straight and not chunked data for small amounts of items? Otherwise these 180-200ms are huge performance loss for us.

Thanks