Hi!
If I send a certain amount of bytes (20344), it takes .3 seconds. But if I send one that's just a single byte bigger than that, it takes over 5 seconds.
Aside from that unexpected jump, it otherwise looks linear with the number of bytes sent.
I hunted down the problem, and discovered that if I slept for .1 seconds before drakma:HTTP-REQUEST calls FINISH-OUTPUT, the problem goes away. (Until, I suppose, I send something much bigger.)
Any ideas? Maybe this is a Lispworks problem?
(Lispworks 5.0.0, WinXP, Drakma 0.11.5)
Thanks, Tayssir
PS: My test --
cl-user> (let* ((num-octets 20345) (octets (coerce (loop repeat num-octets collect (code-char 50)) 'vector))) (time (drakma:http-request "http://..." :content-length num-octets :content-type "application/octet-stream" :want-stream nil :method :post :content octets)))
User time = 0.000 System time = 0.010 Elapsed time = 5.225 Allocation = 37612 bytes
--- c:/Apps/asdf-libs/drakma-0.11.5/request.lisp.old 2008-12-16 16:18:33.618457600 +0100 +++ c:/Apps/asdf-libs/drakma-0.11.5/request.lisp 2008-12-16 16:18:09.156592000 +0100 @@ -560,6 +560,7 @@ (return-from finish-request)) (setf (chunked-stream-output-chunking-p (flexi-stream-stream http-stream)) nil) + (sleep .1) (finish-output http-stream) (multiple-value-bind (server-protocol status-code status-text) ;; loop until status is NOT 100
Hmm, let me actually test that on the newly-released LispWorks before anyone spends time on this...
Tayssir
Tayssir John Gabbour wrote:
Hi!
If I send a certain amount of bytes (20344), it takes .3 seconds. But if I send one that's just a single byte bigger than that, it takes over 5 seconds.
Aside from that unexpected jump, it otherwise looks linear with the number of bytes sent.
I hunted down the problem, and discovered that if I slept for .1 seconds before drakma:HTTP-REQUEST calls FINISH-OUTPUT, the problem goes away. (Until, I suppose, I send something much bigger.)
Any ideas? Maybe this is a Lispworks problem?
(Lispworks 5.0.0, WinXP, Drakma 0.11.5)
Thanks, Tayssir
PS: My test --
cl-user> (let* ((num-octets 20345) (octets (coerce (loop repeat num-octets collect (code-char 50)) 'vector))) (time (drakma:http-request "http://..." :content-length num-octets :content-type "application/octet-stream" :want-stream nil :method :post :content octets)))
User time = 0.000 System time = 0.010 Elapsed time = 5.225 Allocation = 37612 bytes
drakma-devel mailing list drakma-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel
On Wed, 17 Dec 2008 11:51:51 +0100, Tayssir John Gabbour tjg@pentaside.org wrote:
Hmm, let me actually test that on the newly-released LispWorks before anyone spends time on this...
Yes, and please let us know the results. This sounds strange, but right now I don't have the time to look into this.
Thanks, Edi.