Daniel Näslund <daniel_at_longitudo.com
<mailto:daniel_at_longitudo.com?Subject=Re:%20svn%20commit:%20r985514%20-%20in%20/subversion/branches/performance/subversion:%20include/svn_io.h%20libsvn_subr/stream.c%20libsvn_subr/subst.c>>
wrote:
> On Sat, Aug 14, 2010 at 03:46:13PM -0000, stefan2_at_apache.org wrote:
> /> Author: stefan2 /
> /> Date: Sat Aug 14 15:46:13 2010 /
> /> New Revision: 985514 /
> /> /
> /> URL: http://svn.apache.org/viewvc?rev=985514&view=rev
> <http://svn.apache.org/viewvc?rev=985514&view=rev> /
> /> Log: /
> /> Extend the stream API by three functions: /
> /> svn_stream_move_mark() to move an existing mark by some delta /
> /> svn_stream_supports_mark() tells whether getting, setting and
> moving marks is supported by this stream /
> /> /
> /> * subversion/include/svn_io.h /
> /> (svn_io_move_mark_fn_t, svn_io_buffered_fn_t): /
> /> declare new vtable function pointers /
> /> (svn_stream_set_move_mark, svn_stream_set_buffered): /
> /> declare functions to set these vtable pointers /
> /> (svn_stream_supports_mark, svn_stream_move_mark,
> svn_stream_buffered): /
> /> declare new stream API functions /
> /> /
> /> * subversion/libsvn_subr/stream.c /
> /> (svn_stream_t): extend the vtable part by the new functions /
> /> (svn_stream_create): add initialization code for the new vtable
> entries /
> /> (svn_stream_set_move_mark, svn_stream_set_buffered): /
> /> implement new vtable modifiers /
> /> (svn_stream_supports_mark, svn_stream_buffered, svn_stream_buffered): /
> /> implement new stream generic API functions /
> /> (move_mark_handler_empty, buffered_handler_empty, svn_stream_empty): /
> /> implement support for the new stream API in empty streams /
> /> (move_mark_handler_disown, buffered_handler_disown,
> svn_stream_disown): /
> /> implement support for the new stream API in disowned streams /
> /> (move_mark_handler_apr, buffered_handler_apr, stream_from_aprfile, /
> /> svn_stream_from_aprfile_range_readonly): /
> /> implement support for the new stream API in APR file based streams /
> /> (move_mark_handler_stringbuf, buffered_handler_stringbuf, /
> /> svn_stream_from_stringbuf): /
> /> implement support for the new stream API in stringbuf streams /
> /> /
> /> * subversion/libsvn_subr/subst.c /
> /> (translated_stream_move_mark, translated_stream_buffered, /
> /> svn_subst_stream_translated): /
> /> implement support for the new stream API in translated streams /
>
> Out of curiosity, why are you touching the svn_stream_mark() code on
> the performance branch? AFAIK, svn_stream_mark() is only used in the
> patch code. What performance benefits are you hoping to achieve?
See r985601. If the parser is to read larger chunks of data speculatively,
it needs to re-position the stream read pointer afterwards. Not all streams
can support that feature efficiently or at all.
-- Stefan^2.
Received on 2010-08-15 14:43:02 CEST