Re: 3.0.20 regression testing

Lee <[email protected]>
Newsgroups gmane.comp.web.privoxy.devel
Message-ID <CAD8GWsueU9_YLjWmdLoQNaRwV51JCNgKtacbPA77fce=2iCFVQ@mail.gmail.com>
On 1/5/13, Fabian Keil <[email protected]> wrote:
> Lee <[email protected]> wrote:
>
>> On 1/4/13, Fabian Keil <[email protected]> wrote:
>> > Lee <[email protected]> wrote:
>> >
>> >> On 1/3/13, Fabian Keil <[email protected]> wrote:
>
>> > On FreeBSD Privoxy-Regression-Test spends most of the time
>> > (IIRC more than 99%) executing curl, so you could try using
>> > a native curl binary which might make a difference.
>>
>> I suspect a native curl binary would be more trouble than it's worth
>> since I'd also need a native perl binary + native whatever else the
>> regression test uses
>
> I always assumed that it would be possible to call native binaries
> from cygwin (but don't remember ever testing it).

It is possible.  It's just been my experience that dealing with the
differences between line endings, forward/backwards slashes, spaces in
file names/directories, etc. quickly gets to the point where it isn't
worth my time trying to make it work correctly.

>> > You could also try profiling Privoxy-Regression-Test yourself first,
>> > but getting Devel::NYTProf running on Windows might not be your idea
>> > of a having a good time.
>>
>> I think the problem is process creation in cygwin.  Try this on your
>> FreeBSD box
>
> I agree that slow process creation is likely the main cause
> of the problem, but my theory was that it would be faster when
> calling native binaries.

The impression I've gotten from the cygwin mailing list is that
process creation is slow - period.  But I've never tried to see if
there was a noticeable difference  between windows & cygwin binaries
so...

$ cat speed.sh
#!/bin/sh
echo "cygwin:"
T=`date +"%S"`
N=0
REPS=0
while [ $REPS -lt 6 ]; do
  if [ "$T" != "`date +"%S"`" ]; then
    printf "Loops: %s, time=%s\n" $N $T
    T=`date +"%S"`
    N=0
    REPS=`expr $REPS + 1`
  fi
  /usr/bin/whoami > /dev/null
  N=`expr $N + 1`
done

echo "windows:"
T=`date +"%S"`
N=0
REPS=0
while [ $REPS -lt 6 ]; do
  if [ "$T" != "`date +"%S"`" ]; then
    printf "Loops: %s, time=%s\n" $N $T
    T=`date +"%S"`
    N=0
    REPS=`expr $REPS + 1`
  fi
  /cygdrive/c/WINDOWS/system32/whoami > /dev/null
  N=`expr $N + 1`
done

$ ./speed.sh
cygwin:
Loops: 12, time=30
Loops: 16, time=31
Loops: 16, time=32
Loops: 16, time=33
Loops: 16, time=34
Loops: 15, time=35
windows:
Loops: 13, time=36
Loops: 13, time=37
Loops: 13, time=38
Loops: 14, time=39
Loops: 13, time=40
Loops: 13, time=41

Assuming the processing requirements for the windows & cygwin versions
of whoami are about the same, slight edge to native cygwin binaries
when using cygwin.

Regards,
Lee

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122912
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.