On 4 February 2017 at 21:40, Evgeny Kotkov <evgeny.kot...@visualsvn.com> wrote:
> Hi everyone,
>
> The Unix implementation of apr_file_gets() features an optimization
> for buffered files that avoids calling apr_file_read() / memcpy() for
> one byte, and directly uses the buffered data.  This optimization was
> added in https://svn.apache.org/r65294
>
> The attached patch implements the same optimization in the Win32 version
> of apr_file_gets(), and extends the corresponding part of the test suite.
>
> This makes the function roughly 4 times faster than before.  It is heavily
> used by the Subversion's filesystem layer and various modules in the
> HTTP Server, e.g., mod_negotiation, and these or other existing callers
> would benefit from this optimization.
>
Hi Evgeny,

Thanks for the patch. Committed in r1785072 [1]

PS: apr_file_gets() could be further optimized by using memchr() to
find '\n' in the buffer, but I don't know whether performance
improvement worth the efforts.

https://svn.apache.org/r1785072


-- 
Ivan Zhakov

Reply via email to