git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Lukashov <michael.lukashov@gmail.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Johannes Sixt <j.sixt@viscovery.net>, git@vger.kernel.org
Subject: Re: [PATCH v2] Windows: improve performance by avoiding a static  dependency on ws2_32.dll and advapi32.dll
Date: Thu, 28 Jan 2010 13:47:19 +0300	[thread overview]
Message-ID: <63cde7731001280247w51d32475ob5fa22f796fa50b7@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.1.00.1001281137550.3380@intel-tinevez-2-302>

>> >
>>
>> "git status" calls ntohs function, which was loaded from ws2_32.dll
>> I've noticed that bswap.h contains implementation of ntohl htonl functions,
>> so I decided to add implementation of ntohs htons functions, which is
>> pretty trivial.
>> After that call to "git status" doesn't load ws2_32.dll
>
> I am still not convinced of that patch, because the timings are still
> missing.
>
> Ciao,
> Dscho
>
>

Oops, sorry for the noise (again).

"git status" calls ntohs function, which was loaded from ws2_32.dll
I've noticed that bswap.h contains implementation of ntohl htonl functions,
so I decided to add implementation of ntohs htons functions, which is
pretty trivial.
After that call to "git status" doesn't load ws2_32.dll

The following commands were run and timed, the
best of five results is shown:

for i in `seq 1 10`;
do
	git status
	git log -n2
	git diff
done

before:
real    0m30.024s
user    0m0.105s
sys     0m0.425s

after:
real    0m29.578s
user    0m0.105s
sys     0m0.318s

The runtime of 'make -j2 test' went down from 35:19min
to 32:39min on my machine.

  reply	other threads:[~2010-01-28 10:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-28  8:15 [PATCH v2] Windows: improve performance by avoiding a static dependency on ws2_32.dll and advapi32.dll Michael Lukashov
2010-01-28  9:09 ` Johannes Sixt
2010-01-28 10:18   ` Michael Lukashov
2010-01-28 10:38     ` Johannes Schindelin
2010-01-28 10:47       ` Michael Lukashov [this message]
2010-01-29  7:44         ` Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63cde7731001280247w51d32475ob5fa22f796fa50b7@mail.gmail.com \
    --to=michael.lukashov@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).