|
From: | Martin Bisson |
Subject: | Re: [libmicrohttpd] Performance problem under Windows |
Date: | Thu, 10 Feb 2011 16:01:42 -0500 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 |
On 09/02/2011 8:55 AM, Christian Grothoff wrote:
I find the "little more than 1 second per request" a little suspicious. I looked at the code in daemon.c and both the select() and the poll() calls use a 1 second timeout... I was wondering if there might be a problem with that under Windows...? Or is the 1 second per request an expected latency for libmicrohttpd with client& server on the same computer?Well, I don't know how the 1s timeout in select relates to your performance issue (have you tried changing it to 10s and seeing if performance goes down accordingly), but what I can say is that MHD has no expected latency -- it should be "instant" (as far as your OS/hardware can deliver). Now, 0.4.5 is of course ancient and various issues have been introduced and fixed since (see ChangeLog), so I don't know if you're possibly hitting one of those.
Ok. I rebuilt libmicrohttpd-0.9.6 and tried, still the same problem. I changed the poll & select timeouts to 10 ms, no change. I tried my python script with a local Apache server, and I get low latency.
But still, with libmicrohttpd, I get latencies that are slightly above 1 s. So I really feel, like something is still waiting for 1 s somewhere. I identified that the waiting is after my request is sent and before my request-handling callback is called by libmicrohttpd, but I don't really how to identify the problem...
Any idea what to do next to get libmicrohttpd to respond faster? Thanks in advance, Martin
[Prev in Thread] | Current Thread | [Next in Thread] |