[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1683895 - /subversion/trunk/subversion/libsvn_delta/svndiff.c

From: Branko Čibej <brane_at_wandisco.com>
Date: Sat, 06 Jun 2015 15:47:58 +0200

On 06.06.2015 13:42, ivan_at_apache.org 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
Received on 2015-06-06 15:48:28 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.