On 06.06.2015 13:42, [email protected] wrote: > Author: ivan > Date: Sat Jun 6 11:42:31 2015 > New Revision: 1683895 > > URL: http://svn.apache.org/r1683895 > Log: > Simplify code and avoid multiple buffer reallocation for every delta > window in SVNDIFF stream processing. > > * subversion/libsvn_delta/svndiff.c > (write_handler): Use svn_stringbuf_remove() to remove processed > window data from buffer. Clear subpool on every window procesing > instead of creating new subpool and destroy old one. > (svn_txdelta_parse_svndiff): Allocate DB->BUFFER in DB->POOL instead of > DB->SUBPOOL.
If you're optimizing that code, you could consider dropping svn_stringbuf_t entirely and switching to (private) svn_membuf_t. The advantage of that is that stringbuf always keeps a NUL terminator at the end of the data, whereas membuf does not. -- Brane

