On Thu, Jul 04, 2013 at 02:57:31PM +0300, Lasse Collin wrote:
In contrast to your patch, the committed code calls read() as long as read() can fill the buffer completely. poll() is only called when read() would block and only then is the flush-timeout checked. Thus, the system time isn't polled with clock_gettime() or gettimeofday() on every call to io_read() when the flush-timeout is active.
I'll give it a whirl here at work when I find the time, but I would be curious to find out what the affect is on latency when the input pressure is always (say '-9' the input so we are CPU bound).
Testing will tell me mind you.
For now, xz cannot be used for the decompression side because xz does too much buffering. It is similar with XZ for Java unless one reads one byte at a time. xz should naturally be usable for the decompression side too. I haven't decided yet how to fix it (e.g. require an option or perhaps always disable buffering).
Not a problem for us, internally we are using the library directly in our code. Cheers -- Alexander Clouter .sigmonster says: Stop ahead.