When I call http-request with :close nil argument it takes 6 seconds more:
CL-USER> (time (drakma:http-request "http://192.168.1.2/")) Evaluation took: 0.013 seconds of real time 0.008001 seconds of total run time (0.008001 user, 0.000000 system) 61.54% CPU 17,442,126 processor cycles 233,168 bytes consed "..." 200 ((:CONNECTION . "close") (:CONTENT-LENGTH . "917") (:CONTENT-TYPE . "text/html; charset=utf-8") (:DATE . "Mon, 25 Aug 2008 12:46:20 GMT") (:SERVER . "Hunchentoot 0.15.7")) #<PURI:URI http://192.168.1.2%3E #<FLEXI-STREAMS:FLEXI-IO-STREAM {1005E78681}> T "OK"
CL-USER> (time (drakma:http-request "http://192.168.1.2/" :close nil)) Evaluation took: 6.428 seconds of real time 0.488030 seconds of total run time (0.400025 user, 0.088005 system) [ Run times consist of 0.240 seconds GC time, and 0.249 seconds non-GC time. ] 7.59% CPU 212 lambdas converted 994,309,191 processor cycles 18,388,176 bytes consed "..." 200 ((:CONTENT-LENGTH . "917") (:CONTENT-TYPE . "text/html; charset=utf-8") (:DATE . "Mon, 25 Aug 2008 12:46:04 GMT") (:SERVER . "Hunchentoot 0.15.7")) #<PURI:URI http://192.168.1.2%3E #<FLEXI-STREAMS:FLEXI-IO-STREAM {100799E001}> NIL "OK"
Drakma and all dependancies are latest, tested with SBCL and CCL, and different web servers.
On Mon, 25 Aug 2008 16:52:03 +0400, "Stas Boukarev" stassats@gmail.com wrote:
When I call http-request with :close nil argument it takes 6 seconds more
Please try with FLEXI-STREAMS 1.0.6, that should hopefully fix this.
Thanks for the report, Edi.
On 8/26/08, Edi Weitz edi@agharta.de wrote:
On Mon, 25 Aug 2008 16:52:03 +0400, "Stas Boukarev" stassats@gmail.com wrote:
When I call http-request with :close nil argument it takes 6 seconds more
Please try with FLEXI-STREAMS 1.0.6, that should hopefully fix this.
It still spends 6 second in FLEXI-STREAMS::READ-SEQUENCE*
On Tue, 26 Aug 2008 09:28:04 +0400, "Stas Boukarev" stassats@gmail.com wrote:
It still spends 6 second in FLEXI-STREAMS::READ-SEQUENCE*
Seems there was another thinko in FLEXI-STREAMS. Could you try with 1.0.7 again?
Thanks, Edi.
On 8/26/08, Edi Weitz edi@agharta.de wrote:
On Tue, 26 Aug 2008 09:28:04 +0400, "Stas Boukarev" stassats@gmail.com wrote:
It still spends 6 second in FLEXI-STREAMS::READ-SEQUENCE*
Seems there was another thinko in FLEXI-STREAMS. Could you try with 1.0.7 again?
Still the same... I also noticed that it's fast if it encounters 404 error.
On Tue, 26 Aug 2008 17:24:28 +0400, "Stas Boukarev" stassats@gmail.com wrote:
Still the same... I also noticed that it's fast if it encounters 404 error.
So, now I can't reproduce it anymore. See below - one is chunked, the other not. One is UTF-8, the other one LATIN-1.
Would you have a more specific test case, preferably with a public URL?
Thanks, Edi.
CL-USER 3 > (time (drakma:http-request "http://miles.agharta.de/" :close nil)) Timing the evaluation of (DRAKMA:HTTP-REQUEST "http://miles.agharta.de/" :CLOSE NIL)
User time = 0.000 System time = 0.000 Elapsed time = 0.281 Allocation = 30920 bytes 0 Page faults "<html> <head> <meta http-equiv="refresh" content="0;url=http://weitz.de/%5C%22%3E </head> <body> </body> </html> " 200 ((:DATE . "Tue, 26 Aug 2008 13:32:45 GMT") (:SERVER . "Apache") (:X-POWERED-BY . "PHP/5.2.5-2") (:CONTENT-LENGTH . "118") (:CONTENT-TYPE . "text/html; charset=utf-8")) #<PURI:URI http://miles.agharta.de%3E #<FLEXI-STREAMS:FLEXI-IO-STREAM 22194D5F> NIL "OK"
CL-USER 4 > (time (drakma:http-request "http://zappa.agharta.de/" :close nil)) Timing the evaluation of (DRAKMA:HTTP-REQUEST "http://zappa.agharta.de/" :CLOSE NIL)
User time = 0.000 System time = 0.000 Elapsed time = 0.328 Allocation = 61892 bytes 0 Page faults "<HTML> <HEAD> <META HTTP-EQUIV="refresh" CONTENT="5;URL=http://www.weitz.de/%5C%22%3E </HEAD> <BODY><center> <table border=3 bordercolor=green cellpadding=5 cellspacing=5><tr><td align=center> <pre> Linux zappa 2.4.20-bf2.4 #1 Wed Dec 25 13:17:08 UTC 2002 i686 GNU/Linux
15:32:53 up 302 days, 8:07, 0 users, load average: 0.05, 0.03, 0.00
</pre> </td></tr></table></center>
</BODY> </HTML>
" 200 ((:DATE . "Tue, 26 Aug 2008 13:32:53 GMT") (:SERVER . "Apache") (:TRANSFER-ENCODING . "chunked") (:CONTENT-TYPE . "text/html; charset=iso-8859-1")) #<PURI:URI http://zappa.agharta.de%3E #<FLEXI-STREAMS:FLEXI-IO-STREAM 2008AC77> NIL "OK"
On 8/26/08, Edi Weitz edi@agharta.de wrote:
On Tue, 26 Aug 2008 17:24:28 +0400, "Stas Boukarev" stassats@gmail.com wrote:
Still the same... I also noticed that it's fast if it encounters 404 error.
So, now I can't reproduce it anymore. See below - one is chunked, the other not. One is UTF-8, the other one LATIN-1.
Would you have a more specific test case, preferably with a public URL?
It seems that it's only slow with hunchentoot, but with lighttpd and other servers (and with your testcases) it's now ok.
http://stassats.dyndns.org/ where hunchentoot is running
On Tue, 26 Aug 2008 18:00:43 +0400, "Stas Boukarev" stassats@gmail.com wrote:
It seems that it's only slow with hunchentoot, but with lighttpd and other servers (and with your testcases) it's now ok.
I found something in Drakma which doesn't work with the recent changes to FLEXI-STREAMS. I've fixed the dev version here
http://bknr.net/trac/changeset/3742/trunk/thirdparty/drakma
but the patch should also work for the released version.
http://stassats.dyndns.org/ where hunchentoot is running
I get 503 - service not available. I don't think this is related to Hunchentoot, though.
Cheers, Edi.
Hi Edi
Edi Weitz edi@agharta.de writes:
I found something in Drakma which doesn't work with the recent changes to FLEXI-STREAMS. I've fixed the dev version here
http://bknr.net/trac/changeset/3742/trunk/thirdparty/drakma
but the patch should also work for the released version.
Does this mean the stable version (of Drakma) located on weitz.de is broken with the current version of FLEXI-STREAMS? If so, do you perhaps know the version no. of the last stable version that won't break it (but also won't break Hunchentoot).
Many thanks. Nico
BTW, I am using several of your libraries in a couple of busy donor funded pediatric and perinatal HIV clinics in South Africa.
On Wed, 27 Aug 2008 13:29:24 +0200, Nico de Jager ndj@hivsa.com wrote:
Does this mean the stable version (of Drakma) located on weitz.de is broken with the current version of FLEXI-STREAMS?
It seems so, although you'll only see the bug under certain circumstances. Specifically, if a) you explicitly insist on the stream not being closed, b) the server provides the content length of the reply, c) the content type is text, and d) the encoding is UTF-8 or some other encoding where there length of the text can't be easily computed from the number of the octets.
(And I wouldn't dare to say that other versions or combinations are /not/ broken. They'll just have bugs that nobody found yet... :)
If so, do you perhaps know the version no. of the last stable version that won't break it (but also won't break Hunchentoot).
I haven't checked, sorry. Maybe 0.14.0 and earlier.
BTW, I am using several of your libraries in a couple of busy donor funded pediatric and perinatal HIV clinics in South Africa.
That's good to know, thanks. Maybe you can send me some more details (maybe in private email)?
On 8/27/08, Edi Weitz edi@agharta.de wrote:
On Tue, 26 Aug 2008 18:00:43 +0400, "Stas Boukarev" stassats@gmail.com wrote:
It seems that it's only slow with hunchentoot, but with lighttpd and other servers (and with your testcases) it's now ok.
I found something in Drakma which doesn't work with the recent changes to FLEXI-STREAMS. I've fixed the dev version here
http://bknr.net/trac/changeset/3742/trunk/thirdparty/drakma
but the patch should also work for the released version.
I tested that patch and it works, thanks!