From tjg at pentaside.org Tue Dec 16 16:27:35 2008 From: tjg at pentaside.org (Tayssir John Gabbour) Date: Tue, 16 Dec 2008 17:27:35 +0100 Subject: [drakma-devel] Surprising jump in time when sending binary Message-ID: <4947D6F7.1090602@pentaside.org> 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 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: drakma-diff.txt URL: From tjg at pentaside.org Wed Dec 17 10:51:51 2008 From: tjg at pentaside.org (Tayssir John Gabbour) Date: Wed, 17 Dec 2008 11:51:51 +0100 Subject: [drakma-devel] Surprising jump in time when sending binary In-Reply-To: <4947D6F7.1090602@pentaside.org> References: <4947D6F7.1090602@pentaside.org> Message-ID: <4948D9C7.9080907@pentaside.org> 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 at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/drakma-devel From edi at agharta.de Wed Dec 17 11:14:56 2008 From: edi at agharta.de (Edi Weitz) Date: Wed, 17 Dec 2008 12:14:56 +0100 Subject: [drakma-devel] Surprising jump in time when sending binary In-Reply-To: <4948D9C7.9080907@pentaside.org> (Tayssir John Gabbour's message of "Wed, 17 Dec 2008 11:51:51 +0100") References: <4947D6F7.1090602@pentaside.org> <4948D9C7.9080907@pentaside.org> Message-ID: On Wed, 17 Dec 2008 11:51:51 +0100, Tayssir John Gabbour 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.