{"thread":{"id":"22420","subject":"[PATCH v2] Windows: improve performance by avoiding a static dependency on ws2_32.dll and advapi32.dll","startedAt":"2010-01-28T08:15:25Z","lastAt":"2010-01-29T07:44:16Z","messageCount":6,"participants":["Michael Lukashov","Johannes Sixt","Johannes Schindelin"],"isPatch":true,"patchVersion":2,"patchTotal":null},"messages":[{"id":"132864","messageId":"1264666525-4956-1-git-send-email-michael.lukashov@gmail.com","threadId":"22420","inReplyTo":null,"subject":"[PATCH v2] Windows: improve performance by avoiding a static dependency on ws2_32.dll and advapi32.dll","fromName":"Michael Lukashov","fromEmail":"michael.lukashov@gmail.com","sentAt":"2010-01-28T08:15:25Z","receivedAt":"2010-01-28T08:15:25Z","isPatch":true,"sender":{"key":"michael.lukashov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/890439?v=4"},"body":"ws2_32.dll is used by limited subset of git commands, such as pull,\npush, fetch, send-email, ... By looking up functions that we need\nat runtime, we can avoid the startup costs of this DLL.\nAs a result, we can remove static dependency on advapi32.dll too.\n\nA call to \"git status\" loaded\n\nbefore:  8 DLL\nafter:   4 DLL\n\nSigned-off-by: Michael Lukashov <michael.lukashov@gmail.com>\n---\n Makefile       |    1 -\n compat/bswap.h |   30 +++++++++\n compat/mingw.c |  193 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-\n compat/mingw.h |   49 +++++++++++++-\n 4 files changed, 265 insertions(+), 8 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex af08c8f..4a79eaa 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1041,7 +1041,6 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n \tCOMPAT_CFLAGS += -DSTRIP_EXTENSION=\\\".exe\\\"\n \tCOMPAT_OBJS += compat/mingw.o compat/fnmatch/fnmatch.o compat/winansi.o \\\n \t\tcompat/win32/pthread.o\n-\tEXTLIBS += -lws2_32\n \tPTHREAD_LIBS =\n \tX = .exe\n ifneq (,$(wildcard ../THIS_IS_MSYSGIT))\ndiff --git a/compat/bswap.h b/compat/bswap.h\nindex f3b8c44..08aea39 100644\n--- a/compat/bswap.h\n+++ b/compat/bswap.h\n@@ -1,3 +1,6 @@\n+#ifndef BSWAP_H\n+#define BSWAP_H\n+\n /*\n  * Let's make sure we always have a sane definition for ntohl()/htonl().\n  * Some libraries define those as a function call, just to perform byte\n@@ -17,6 +20,12 @@ static inline uint32_t default_swab32(uint32_t val)\n \t\t((val & 0x000000ff) << 24));\n }\n \n+static inline uint16_t default_swab16(uint16_t val)\n+{\n+\treturn (((val & 0xff00) >>  8) |\n+\t\t((val & 0x00ff) << 8));\n+}\n+\n #if defined(__GNUC__) && (defined(__i386__) || defined(__x86_64__))\n \n #define bswap32(x) ({ \\\n@@ -28,11 +37,21 @@ static inline uint32_t default_swab32(uint32_t val)\n \t} \\\n \t__res; })\n \n+#define bswap16(x) ({ \\\n+\tuint16_t __res; \\\n+\tif (__builtin_constant_p(x)) { \\\n+\t\t__res = default_swab16(x); \\\n+\t} else { \\\n+\t\t__asm__(\"xchgb %b0, %h0\" : \"=q\" (__res) : \"0\" ((uint16_t)(x))); \\\n+\t} \\\n+\t__res; })\n+\n #elif defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))\n \n #include <stdlib.h>\n \n #define bswap32(x) _byteswap_ulong(x)\n+#define bswap16(x) _byteswap_ushort(x)\n \n #endif\n \n@@ -44,3 +63,14 @@ static inline uint32_t default_swab32(uint32_t val)\n #define htonl(x) bswap32(x)\n \n #endif\n+\n+#ifdef bswap16\n+\n+#undef ntohs\n+#undef htons\n+#define ntohs(x) bswap16(x)\n+#define htons(x) bswap16(x)\n+\n+#endif\n+\n+#endif\ndiff --git a/compat/mingw.c b/compat/mingw.c\nindex ab65f77..484cf7c 100644\n--- a/compat/mingw.c\n+++ b/compat/mingw.c\n@@ -891,6 +891,172 @@ char **make_augmented_environ(const char *const *vars)\n \treturn env;\n }\n \n+static HMODULE ws2_32_dll = NULL;\n+static LPFN_INET_NTOA ws2_32_inet_ntoa;\n+static LPFN_CONNECT ws2_32_connect;\n+static LPFN_SELECT ws2_32_select;\n+static LPFN_CLOSESOCKET ws2_32_closesocket;\n+static LPFN_GETSERVBYPORT ws2_32_getservbyport;\n+static LPFN_GETSERVBYNAME ws2_32_getservbyname;\n+static LPFN_GETHOSTBYADDR ws2_32_gethostbyaddr;\n+static LPFN_GETHOSTNAME ws2_32_gethostname;\n+static LPFN_GETHOSTBYNAME ws2_32_gethostbyname;\n+static LPFN_WSASTARTUP ws2_32_WSAStartup;\n+static LPFN_WSACLEANUP ws2_32_WSACleanup;\n+static LPFN_WSAGETLASTERROR ws2_32_WSAGetLastError;\n+static LPFN_WSASOCKETA ws2_32_WSASocketA;\n+\n+static void ws2_32_cleanup(void)\n+{\n+\tif (ws2_32_dll)\n+\t\tFreeLibrary(ws2_32_dll);\n+\tws2_32_dll = NULL;\n+\tws2_32_inet_ntoa = NULL;\n+\tws2_32_connect = NULL;\n+\tws2_32_select = NULL;\n+\tws2_32_closesocket = NULL;\n+\tws2_32_getservbyport = NULL;\n+\tws2_32_getservbyname = NULL;\n+\tws2_32_gethostbyaddr = NULL;\n+\tws2_32_gethostname = NULL;\n+\tws2_32_gethostbyname = NULL;\n+\tws2_32_WSAStartup = NULL;\n+\tws2_32_WSACleanup = NULL;\n+\tws2_32_WSAGetLastError = NULL;\n+\tws2_32_WSASocketA = NULL;\n+}\n+\n+static void ensure_ws2_32_initialization(void)\n+{\n+\tstatic int ws2_32_initialized = 0;\n+\n+\tif (ws2_32_initialized)\n+\t\treturn;\n+\n+\tws2_32_dll = LoadLibrary(\"ws2_32.dll\");\n+\tif (!ws2_32_dll)\n+\t\tdie(\"cannot load ws2_32.dll\");\n+\n+\tws2_32_inet_ntoa = (LPFN_INET_NTOA)\n+\t\tGetProcAddress(ws2_32_dll, \"inet_ntoa\");\n+\tws2_32_connect = (LPFN_CONNECT)\n+\t\tGetProcAddress(ws2_32_dll, \"connect\");\n+\tws2_32_select = (LPFN_SELECT)\n+\t\tGetProcAddress(ws2_32_dll, \"select\");\n+\tws2_32_closesocket = (LPFN_CLOSESOCKET)\n+\t\tGetProcAddress(ws2_32_dll, \"closesocket\");\n+\tws2_32_getservbyport = (LPFN_GETSERVBYPORT)\n+\t\tGetProcAddress(ws2_32_dll, \"getservbyport\");\n+\tws2_32_getservbyname = (LPFN_GETSERVBYNAME)\n+\t\tGetProcAddress(ws2_32_dll, \"getservbyname\");\n+\tws2_32_gethostbyaddr = (LPFN_GETHOSTBYADDR)\n+\t\tGetProcAddress(ws2_32_dll, \"gethostbyaddr\");\n+\tws2_32_gethostname = (LPFN_GETHOSTNAME)\n+\t\tGetProcAddress(ws2_32_dll, \"gethostname\");\n+\tws2_32_gethostbyname = (LPFN_GETHOSTBYNAME)\n+\t\tGetProcAddress(ws2_32_dll, \"gethostbyname\");\n+\tws2_32_WSAStartup = (LPFN_WSASTARTUP)\n+\t\tGetProcAddress(ws2_32_dll, \"WSAStartup\");\n+\tws2_32_WSACleanup = (LPFN_WSACLEANUP)\n+\t\tGetProcAddress(ws2_32_dll, \"WSACleanup\");\n+\tws2_32_WSAGetLastError = (LPFN_WSAGETLASTERROR)\n+\t\tGetProcAddress(ws2_32_dll, \"WSAGetLastError\");\n+\tws2_32_WSASocketA = (LPFN_WSASOCKETA)\n+\t\tGetProcAddress(ws2_32_dll, \"WSASocketA\");\n+\n+\tif (!ws2_32_inet_ntoa || !ws2_32_connect || !ws2_32_select ||\n+\t\t!ws2_32_closesocket || !ws2_32_getservbyport || !ws2_32_getservbyname ||\n+\t\t!ws2_32_gethostbyaddr || !ws2_32_gethostname || !ws2_32_gethostbyname ||\n+\t\t!ws2_32_WSAStartup || !ws2_32_WSACleanup ||\n+\t\t!ws2_32_WSAGetLastError || !ws2_32_WSASocketA) {\n+\t\tFreeLibrary(ws2_32_dll);\n+\t\tws2_32_dll = NULL;\n+\t\tdie(\"cannot initialize ws2_32.dll\");\n+\t}\n+\tatexit(ws2_32_cleanup);\n+\tws2_32_initialized = 1;\n+}\n+\n+char *mingw_inet_ntoa(struct in_addr in)\n+{\n+\tensure_ws2_32_initialization();\n+\treturn ws2_32_inet_ntoa(in);\n+}\n+\n+int mingw_closesocket(SOCKET s)\n+{\n+\tensure_ws2_32_initialization();\n+\treturn ws2_32_closesocket(s);\n+}\n+\n+int mingw_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,\n+\t\t\tconst struct timeval *timeout)\n+{\n+\tensure_ws2_32_initialization();\n+\treturn ws2_32_select(nfds, readfds, writefds, exceptfds, timeout);\n+}\n+\n+struct servent *mingw_getservbyport(int port, const char *proto)\n+{\n+\tensure_ws2_32_initialization();\n+\treturn ws2_32_getservbyport(port, proto);\n+}\n+\n+struct hostent *mingw_gethostbyaddr(const char *addr, int len, int type)\n+{\n+\tensure_ws2_32_initialization();\n+\treturn ws2_32_gethostbyaddr(addr, len, type);\n+}\n+\n+int mingw_gethostname(char *name, int namelen)\n+{\n+\tensure_ws2_32_initialization();\n+\treturn ws2_32_gethostname(name, namelen);\n+}\n+\n+struct servent *mingw_getservbyname(const char *name, const char *proto)\n+{\n+\tensure_ws2_32_initialization();\n+\treturn ws2_32_getservbyname(name, proto);\n+}\n+\n+int mingw_WSAStartup(WORD wVersionRequested, LPWSADATA lpWSAData)\n+{\n+\tensure_ws2_32_initialization();\n+\treturn ws2_32_WSAStartup(wVersionRequested, lpWSAData);\n+}\n+\n+int mingw_WSACleanup(void)\n+{\n+\tensure_ws2_32_initialization();\n+\treturn ws2_32_WSACleanup();\n+}\n+\n+int mingw_WSAGetLastError(void)\n+{\n+\tensure_ws2_32_initialization();\n+\treturn ws2_32_WSAGetLastError();\n+}\n+\n+SOCKET mingw_WSASocketA(int af, int type, int protocol,\n+\t\t\tLPWSAPROTOCOL_INFOA lpProtocolInfo,\n+\t\t\tGROUP g, DWORD dwFlags)\n+{\n+\tensure_ws2_32_initialization();\n+\treturn ws2_32_WSASocketA(af, type, protocol, lpProtocolInfo, g, dwFlags);\n+}\n+\n+static HMODULE advapi32_dll = NULL;\n+static BOOL (WINAPI *advapi32_get_user_name)(char *, DWORD *);\n+\n+static void advapi32_cleanup(void)\n+{\n+\tif (advapi32_dll)\n+\t\tFreeLibrary(advapi32_dll);\n+\tadvapi32_dll = NULL;\n+\tadvapi32_get_user_name = NULL;\n+}\n+\n /*\n  * Note, this isn't a complete replacement for getaddrinfo. It assumes\n  * that service contains a numerical port, or that it it is null. It\n@@ -1057,11 +1223,13 @@ static void ensure_socket_initialization(void)\n struct hostent *mingw_gethostbyname(const char *host)\n {\n \tensure_socket_initialization();\n-\treturn gethostbyname(host);\n+\tensure_ws2_32_initialization();\n+\treturn ws2_32_gethostbyname(host);\n }\n \n void mingw_freeaddrinfo(struct addrinfo *res)\n {\n+\tensure_socket_initialization();\n \tipv6_freeaddrinfo(res);\n }\n \n@@ -1110,7 +1278,8 @@ int mingw_socket(int domain, int type, int protocol)\n int mingw_connect(int sockfd, struct sockaddr *sa, size_t sz)\n {\n \tSOCKET s = (SOCKET)_get_osfhandle(sockfd);\n-\treturn connect(s, sa, sz);\n+\tensure_ws2_32_initialization();\n+\treturn ws2_32_connect(s, sa, sz);\n }\n \n #undef rename\n@@ -1180,9 +1349,27 @@ struct passwd *getpwuid(int uid)\n {\n \tstatic char user_name[100];\n \tstatic struct passwd p;\n+\tstatic int advapi32_initialized = 0;\n \n \tDWORD len = sizeof(user_name);\n-\tif (!GetUserName(user_name, &len))\n+\n+\tif (!advapi32_initialized)\n+\t{\n+\t\tadvapi32_dll = LoadLibrary(\"advapi32.dll\");\n+\t\tif (!advapi32_dll)\n+\t\t\tdie(\"cannot load advapi32.dll\");\n+\t\tadvapi32_get_user_name = (BOOL (WINAPI *)(char *, DWORD *))\n+\t\t\tGetProcAddress(advapi32_dll, \"GetUserNameA\");\n+\t\tif (!advapi32_get_user_name) {\n+\t\t\tFreeLibrary(advapi32_dll);\n+\t\t\tadvapi32_dll = NULL;\n+\t\t\tdie(\"cannot find GetUserNameA\");\n+\t\t}\n+\t\tatexit(advapi32_cleanup);\n+\t\tadvapi32_initialized = 1;\n+\t}\n+\n+\tif (!advapi32_get_user_name(user_name, &len))\n \t\treturn NULL;\n \tp.pw_name = user_name;\n \tp.pw_gecos = \"unknown\";\ndiff --git a/compat/mingw.h b/compat/mingw.h\nindex e254fb4..466c473 100644\n--- a/compat/mingw.h\n+++ b/compat/mingw.h\n@@ -1,5 +1,6 @@\n #include <winsock2.h>\n #include <ws2tcpip.h>\n+#include \"bswap.h\"\n \n /*\n  * things that are not available in header files\n@@ -176,9 +177,53 @@ char *mingw_getcwd(char *pointer, int len);\n char *mingw_getenv(const char *name);\n #define getenv mingw_getenv\n \n+/*\n+ * wrappers for functions dynamically loaded from ws2_32.dll\n+ */\n+\n+char *mingw_inet_ntoa(struct in_addr in);\n+#define inet_ntoa mingw_inet_ntoa\n+\n+int mingw_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,\n+\t\t\tconst struct timeval *timeout);\n+#define select mingw_select\n+\n+int mingw_closesocket(SOCKET s);\n+#define closesocket mingw_closesocket\n+\n+struct servent *mingw_getservbyport(int port, const char *proto);\n+#define getservbyport mingw_getservbyport\n+\n+struct servent *mingw_getservbyname(const char *name, const char *proto);\n+#define getservbyname mingw_getservbyname\n+\n+struct hostent *mingw_gethostbyaddr(const char *addr, int len, int type);\n+#define gethostbyaddr mingw_gethostbyaddr\n+\n+int mingw_gethostname(char *name, int namelen);\n+#define gethostname mingw_gethostname\n+\n struct hostent *mingw_gethostbyname(const char *host);\n #define gethostbyname mingw_gethostbyname\n \n+int mingw_WSAStartup(WORD wVersionRequested, LPWSADATA lpWSAData);\n+#define WSAStartup mingw_WSAStartup\n+\n+int mingw_WSACleanup(void);\n+#define WSACleanup mingw_WSACleanup\n+\n+int mingw_WSAGetLastError(void);\n+#define WSAGetLastError mingw_WSAGetLastError\n+\n+SOCKET mingw_WSASocketA(int af, int type, int protocol,\n+\t\t\tLPWSAPROTOCOL_INFOA lpProtocolInfo,\n+\t\t\tGROUP g, DWORD dwFlags);\n+#define WSASocketA mingw_WSASocketA\n+\n+/*\n+ * support for IPv6 on MinGW\n+ */\n+\n void mingw_freeaddrinfo(struct addrinfo *res);\n #define freeaddrinfo mingw_freeaddrinfo\n \n@@ -227,10 +272,6 @@ pid_t mingw_spawnvpe(const char *cmd, const char **argv, char **env,\n void mingw_execvp(const char *cmd, char *const *argv);\n #define execvp mingw_execvp\n \n-static inline unsigned int git_ntohl(unsigned int x)\n-{ return (unsigned int)ntohl(x); }\n-#define ntohl git_ntohl\n-\n sig_handler_t mingw_signal(int sig, sig_handler_t handler);\n #define signal mingw_signal\n \n-- \n1.7.0.rc0.1466.g79f2.dirty\n"},{"id":"132873","messageId":"4B61543F.6020904@viscovery.net","threadId":"22420","inReplyTo":"1264666525-4956-1-git-send-email-michael.lukashov@gmail.com","subject":"Re: [PATCH v2] Windows: improve performance by avoiding a static dependency on ws2_32.dll and advapi32.dll","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2010-01-28T09:09:19Z","receivedAt":"2010-01-28T09:09:19Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Michael Lukashov schrieb:\n> ws2_32.dll is used by limited subset of git commands, such as pull,\n> push, fetch, send-email, ... By looking up functions that we need\n> at runtime, we can avoid the startup costs of this DLL.\n> As a result, we can remove static dependency on advapi32.dll too.\n> \n> A call to \"git status\" loaded\n> \n> before:  8 DLL\n> after:   4 DLL\n\nThanks. Due to the size of the change, I would acknowledge it only if you\nhave a proof that the reduced startup costs are noticable, for example, by\nrunning the test suite.\n\nWhat's the deal with bswap? Isn't it an unrelated change? It needs some\nbetter justification. It is unobvious because it is not straight-forward\n\"use pointer to function that was looked up instead of function\".\n\nWill the result not break the MSVC build?\n\n-- Hannes\n"},{"id":"132881","messageId":"63cde7731001280218g29a63094od4f5a8135c6986a4@mail.gmail.com","threadId":"22420","inReplyTo":"4B61543F.6020904@viscovery.net","subject":"Re: [PATCH v2] Windows: improve performance by avoiding a static dependency on ws2_32.dll and advapi32.dll","fromName":"Michael Lukashov","fromEmail":"michael.lukashov@gmail.com","sentAt":"2010-01-28T10:18:56Z","receivedAt":"2010-01-28T10:18:56Z","isPatch":true,"sender":{"key":"michael.lukashov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/890439?v=4"},"body":"> Thanks. Due to the size of the change, I would acknowledge it only if you\n> have a proof that the reduced startup costs are noticable, for example, by\n> running the test suite.\n>\n> What's the deal with bswap? Isn't it an unrelated change? It needs some\n> better justification. It is unobvious because it is not straight-forward\n> \"use pointer to function that was looked up instead of function\".\n>\n> Will the result not break the MSVC build?\n>\n> -- Hannes\n>\n\n\"git status\" calls ntohs function, which was loaded from ws2_32.dll\nI've noticed that bswap.h contains implementation of ntohl htonl functions,\nso I decided to add implementation of ntohs htons functions, which is\npretty trivial.\nAfter that call to \"git status\" doesn't load ws2_32.dll\n"},{"id":"132884","messageId":"alpine.DEB.1.00.1001281137550.3380@intel-tinevez-2-302","threadId":"22420","inReplyTo":"63cde7731001280218g29a63094od4f5a8135c6986a4@mail.gmail.com","subject":"Re: [PATCH v2] Windows: improve performance by avoiding a static dependency on ws2_32.dll and advapi32.dll","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2010-01-28T10:38:31Z","receivedAt":"2010-01-28T10:38:31Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Thu, 28 Jan 2010, Michael Lukashov wrote:\n\n> > Thanks. Due to the size of the change, I would acknowledge it only if you\n> > have a proof that the reduced startup costs are noticable, for example, by\n> > running the test suite.\n> >\n> > What's the deal with bswap? Isn't it an unrelated change? It needs some\n> > better justification. It is unobvious because it is not straight-forward\n> > \"use pointer to function that was looked up instead of function\".\n> >\n> > Will the result not break the MSVC build?\n> >\n> > -- Hannes\n> >\n> \n> \"git status\" calls ntohs function, which was loaded from ws2_32.dll\n> I've noticed that bswap.h contains implementation of ntohl htonl functions,\n> so I decided to add implementation of ntohs htons functions, which is\n> pretty trivial.\n> After that call to \"git status\" doesn't load ws2_32.dll\n\nI am still not convinced of that patch, because the timings are still \nmissing.\n\nCiao,\nDscho\n"},{"id":"132885","messageId":"63cde7731001280247w51d32475ob5fa22f796fa50b7@mail.gmail.com","threadId":"22420","inReplyTo":"alpine.DEB.1.00.1001281137550.3380@intel-tinevez-2-302","subject":"Re: [PATCH v2] Windows: improve performance by avoiding a static dependency on ws2_32.dll and advapi32.dll","fromName":"Michael Lukashov","fromEmail":"michael.lukashov@gmail.com","sentAt":"2010-01-28T10:47:19Z","receivedAt":"2010-01-28T10:47:19Z","isPatch":true,"sender":{"key":"michael.lukashov@gmail.com","avatar":"https://avatars.githubusercontent.com/u/890439?v=4"},"body":">> >\n>>\n>> \"git status\" calls ntohs function, which was loaded from ws2_32.dll\n>> I've noticed that bswap.h contains implementation of ntohl htonl functions,\n>> so I decided to add implementation of ntohs htons functions, which is\n>> pretty trivial.\n>> After that call to \"git status\" doesn't load ws2_32.dll\n>\n> I am still not convinced of that patch, because the timings are still\n> missing.\n>\n> Ciao,\n> Dscho\n>\n>\n\nOops, sorry for the noise (again).\n\n\"git status\" calls ntohs function, which was loaded from ws2_32.dll\nI've noticed that bswap.h contains implementation of ntohl htonl functions,\nso I decided to add implementation of ntohs htons functions, which is\npretty trivial.\nAfter that call to \"git status\" doesn't load ws2_32.dll\n\nThe following commands were run and timed, the\nbest of five results is shown:\n\nfor i in `seq 1 10`;\ndo\n\tgit status\n\tgit log -n2\n\tgit diff\ndone\n\nbefore:\nreal    0m30.024s\nuser    0m0.105s\nsys     0m0.425s\n\nafter:\nreal    0m29.578s\nuser    0m0.105s\nsys     0m0.318s\n\nThe runtime of 'make -j2 test' went down from 35:19min\nto 32:39min on my machine.\n"},{"id":"132941","messageId":"4B6291D0.5000400@viscovery.net","threadId":"22420","inReplyTo":"63cde7731001280247w51d32475ob5fa22f796fa50b7@mail.gmail.com","subject":"Re: [PATCH v2] Windows: improve performance by avoiding a static dependency on ws2_32.dll and advapi32.dll","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2010-01-29T07:44:16Z","receivedAt":"2010-01-29T07:44:16Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Michael Lukashov schrieb:\n> The runtime of 'make -j2 test' went down from 35:19min\n> to 32:39min on my machine.\n\nSorry, I can't back this claim. In my tests, 'make -j2 test' did not go\ndown. My timings were between 13:40min and 13:50min with and without the\npatch, and I tried multiple times.\n\nFor the MinGW version, I'd rather not apply this patch. People interested\nin optimizing the MSVC version could link with /delayload:ws_32.dll to\nachieve the same effect without any change to the code.\n\n-- Hannes\n"}]}