You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Stefan Fuhrmann <st...@alice-dsl.de> on 2010/04/24 22:49:31 UTC

[PATCH] Reducing file I/O overhead

Hi there,

here is just another one from my stack of performance patches.
As suggested in http://svn.haxx.se/dev/archive-2010-03/0612.shtml,
I provided a patch to the APR reducing its runtime for typical usage
scenarios (https://issues.apache.org/bugzilla/show_bug.cgi?id=49085).

The patch below uses the now optimized single-char I/O functions
where appropriate. I also prevents the construction of temporary
error objects (expensive due to NLS) when hitting EOF.

-- Stefan^2.

[[[
Reduce file I/O overhead by using optimized single-char I/O functions
and eliminating unnecessary EOF error objects.

* subversion/include/svn_io.h:
  (svn_io_file_putc, svn_io_file_read_full2): declare new functions.

* subversion/libsvn_subr/io.c:
  (svn_io_file_putc, svn_io_file_read_full2): implement new functions.
  (svn_io_file_write_full): under Windows, call apr_file_write instead
  directly because we already implement the "read full" functionality
  (contents_identical_p): prevent temp. errors upon EOF

* subversion/libsvn_subr/stream.c:
  (read_handler_apr,): use optimized code for single chars;
  prevent temp. errors upon EOF
  (writer_handler_apr): use optimized code for single chars
]]]