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

[PATCH] issue #3719 fix slow large checkouts on Windows

From: Neil Bird <neil_at_jibbyjobby.co.uk>
Date: Thu, 03 Feb 2011 16:18:32 +0000

   This is a patch for discussion which I submitted to issue 3719
(“Extremely slow checkout on Windows”). I shan't repeat everything that's
there; essentially it fixes *really* slow checkouts to NTFS of directories
with large numbers of files with properties.

   I originally modified it slightly to address my second comment on that
issue, namely that just using rand() will leave it with slightly less
functionality than the previous 99999 loop.

   However, that was relying upon my Linux man page telling me RAND_MAX was
32767; it's actually 2147483647. I think it's still smaller on Windows,
though, so it would suffer that limitation. Should we include a small,
custom int-max rand() just for this?

   Otherwise it might be a #if on RAND_MAX.

   A supplementary question is: should I worry about where rand() is
included from? It “just worked” on my Linux build, but I've not tried for
Windows, etc.

   Apologies if I haven't formatted all this correctly.

[[[
Fix issue #3719: prevent logarithmic slow down when checking out large
directories onto Windows NTFS

* subversion/libsvn_subr/io.c
   svn_io_open_unique_file3: don't call svn_io_open_uniquely_named(), but
instead use a copy of that routine that uses rand() to get the next
potential free number instead if simply incrementing, minimising clashes on
repeated calls.

]]]

-- 
[neil_at_fnx ~]# rm -f .signature
[neil_at_fnx ~]# ls -l .signature
ls: .signature: No such file or directory
[neil_at_fnx ~]# exit

Received on 2011-02-03 17:19:18 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.