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

Re: WC modification detection is reading whole files

From: Ivan Zhakov <chemodax_at_gmail.com>
Date: 2006-02-20 18:29:11 CET

On 2/17/06, Ivan Zhakov <chemodax@gmail.com> wrote:
> On 2/17/06, Julian Foad <julianfoad@btopenworld.com> wrote:
> > For a locally-modified file with keyword translation enabled, I noticed that
> > "svn status" processes the locally-modified file every time I run "svn status".
[...]
> >
> > Here's a practical example. In my Subversion trunk tree, with 11 files locally
> > modified:
> >
> > $ svn st -q > /dev/null
> > $ time svn st -q > /dev/null
> > real 0m0.702s
> > user 0m0.464s
> > sys 0m0.228s
> >
> > $ touch subversion/libsvn_*/*.[ch]
> >
> > $ svn st -q > /dev/null
> > $ time svn st -q > /dev/null
> > real 0m1.764s
> > user 0m1.204s
> > sys 0m0.536s
> >
> > These are in both cases repeatable times, when all the files are in the OS's
> > disk cache so the disk activity light doesn't even flicker.
> Yes, this very bad. Many users reports that Subversion slow and most
> of such "slow" is WC.
>
> What about use new Erik's translation API in particular function
> svn_subst_stream_translated(). It returns stream for translated file,
> so we can avoid creating temporary translated files and compare text
> with text-base "on fly"?
> Yes, this doesn't help in #791 problem, but anyway improve performance
> in your case.
I have tested my idea and it works very well:
Original subversion trunk. WC with broken timestamps for all files:
C:\tmp\trans-test\wc\1.3.0>ptime svn st subversion

ptime 1.0 for Win32, Freeware - http://www.pc-tools.net/
Copyright(C) 2002, Jem Berkes <jberkes@pc-tools.net>

=== svn st subversion ===
M subversion\include\svn_subst.h
M subversion\libsvn_wc\log.c
M subversion\libsvn_wc\adm_ops.c
M subversion\libsvn_wc\questions.c
M subversion\libsvn_subr\subst.c

Execution time: 1.769 s

Modified subversion as I proposed. WC with broken timestamps for all files also.
C:\tmp\trans-test\wc\trunk>ptime svn st subversion

ptime 1.0 for Win32, Freeware - http://www.pc-tools.net/
Copyright(C) 2002, Jem Berkes <jberkes@pc-tools.net>

=== svn st subversion ===
M subversion\include\svn_subst.h
M subversion\libsvn_wc\log.c
M subversion\libsvn_wc\adm_ops.c
M subversion\libsvn_wc\questions.c
M subversion\libsvn_subr\subst.c

Execution time: 0.762 s

Same as Julian, I ran status several times, when all the files are in the OS's
disk cache.
But anyway more than 2 times improvement looks reasonable for me. I
need some tests with symlinks (I haven't it on my Windows) and code
cleanups. I'll commit this change or post patch in week.

--
Ivan Zhakov
Received on Mon Feb 20 18:30:10 2006

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.