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

Re: functions that would help TSVN

From: Stefan Sperling <stsp_at_elego.de>
Date: Tue, 1 Mar 2011 13:37:59 +0100

On Tue, Mar 01, 2011 at 01:20:20PM +0100, Stefan Kng wrote:
> Let me illustrate this a little bit:
> Assume: 1M properties in 100k folders
> svn_proplist recursive.
> Callback called 100k times
> for every callback:
> - svn lib allocates memory for the data
> - calls callback function, passes data
> - UI client receives the data, copies the data to big memory buffer
> - svn lib deallocates memory for data
>
> memory allocations/deallocations are slow, especially in
> multi-threaded processes (meaning: not big of a problem for the CL
> client but for UI clients).
> In this scenario, there are 100k allocations and deallocations which
> could get reduced to one big allocation and one deallocation.

Oh, I see. If the overhead of copying between buffers hurts performance
that much, we can provide an API that passes a buffer to the application.

It would be interesting to implement this for proplist and then perform
measurements to see if it really makes that much of a difference.
Proplist is just one example where we need to pull data out of the
DB and give it to library callers. I anticipate additional APIs that
use the callback-passing approach in the future, so any insights gained
while experimenting with proplist will help.
Received on 2011-03-01 13:39:17 CET

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