git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] Windows: improve performance by avoiding a static dependency on ws2_32.dll and advapi32.dll

From
Michael Lukashov <michael.lukashov@gmail.com>
Date
Jan 28, 2010, 10:47 UTC
Message-ID
<63cde7731001280247w51d32475ob5fa22f796fa50b7@mail.gmail.com>
In-Reply-To
<alpine.DEB.1.00.1001281137550.3380@intel-tinevez-2-302>
Show 15 quoted lines
>> >
>>
>> "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.

Previous: Johannes SchindelinNext: Johannes Sixt
Message 5 of 6 in “Windows: improve performance by avoiding a static dependency on ws2_32.dll and advapi32.dll”
  1. Windows: improve performance by avoiding a static dependency on ws2_32.dll and advapi32.dllMichael Lukashov, Jan 28, 2010
  2. Johannes SixtJan 28, 2010
  3. Michael LukashovJan 28, 2010
  4. Johannes SchindelinJan 28, 2010
  5. Michael LukashovJan 28, 2010
  6. Johannes SixtJan 29, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.