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

RE: Speeding up workspace

From: Bert Huijben <rhuijben_at_sharpsvn.net>
Date: Sat, 7 Feb 2009 04:40:05 +0100

> -----Original Message-----
> From: Mark Phippard [mailto:markphip_at_gmail.com]
> Sent: Friday, February 06, 2009 10:38 PM
> To: Ruslan Sivak
> Cc: Toby Thain; Bert Huijben; users_at_subversion.tigris.org
> Subject: Re: Speeding up workspace
> On Fri, Feb 6, 2009 at 4:28 PM, Ruslan Sivak <russ_at_vshift.com> wrote:
> > Toby Thain wrote:
> >>
> >> Switch to Linux or OS X, which should be good for an immediate 10-
> 20x
> >> speedup.
> >>
> >> --Toby
> >
> > Do you have any benchmarks to back this up?
> This isn't really Windows-bashing. The way SVN uses the local
> filesystem is just orders of magnitude faster on Linux and OSX. Here
> is a recent thread:
> http://svn.haxx.se/users/archive-2009-01/0326.shtml
> Back when I used to work on Windows, I would sometimes fire up Linux
> in VMWare to test some Subclipse feature in Linux. The performance of
> Eclipse/SVN in that Linux VM blew away Windows running natively as the
> host. The performance difference is frankly shocking.

Okay, for Javahl/Subclipse:

The Target and Path classes that are used +- everywhere in JavaHL where
multiple paths can be provided hav the same performance issue as I
previously resolved when profiling the slow merge.

On all operating systems except Windows the JNIUtil::preprocessPath method
it calls just makes sure the path is valid. (Simple string operation)

And on Windows it makes sure it is valid, then splits it in all parts
(C:\Folder\With\My\Working\Copy => C:\Folder, C:\Folder\With, ...) and for
each of those it checks if it exists on disk and how it is cased.

Bringing the code from a few microseconds at most to at least milliseconds
and probably much worse. (And that for every path passed through the Targets
and Path classes).

Nothing NTFS specific here; just APR compilation flags for Windows.

The problem is in JNIUtil.cpp, line 799 (JNIUtil::preprocessPath, Current

      /* canonicalize case, and change all separators to '/'. */
      SVN_ERR(svn_path_cstring_from_utf8(&apr_target, path, pool));
      apr_err = apr_filepath_merge(&truenamed_target, "", apr_target,
                                   APR_FILEPATH_TRUENAME, pool);

Note that this flag is documented to fix the casing on Windows only. (It
doesn't resolve casing issues on OS/x), so my guess is that for subclipse
you never want this to happen at all.

(We used to have the same code in svn_path_get_absolute() since a few weeks
after subversion was self hosting (r13)

The only problem here in JavaHL is that we might not be able to fix it
without breaking the backwards compatibility of the rest of JavaHL.

I'm not sure if users actually expect this Windows-Only normalization to
happen.. They are programming for Java...


Received on 2009-02-07 04:41:25 CET

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.