Hi Olivier,

This might be related to chunked encoding and persistent connections that
are typically used in HTTP 1.1 communications.

I've entered a defect:

"Slow responses with RESTClient"
http://restlet.tigris.org/issues/show_bug.cgi?id=757

Could you attach your sample "test.txt" file as its content and/or size
might be what triggers the issue?
 
Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com


-----Message d'origine-----
De : Olivier Bruchez [mailto:[email protected]] 
Envoyé : mardi 3 mars 2009 15:27
À : [email protected]; Olivier Bruchez
Objet : RE: POST/PUT requests take more than 2 seconds

Hi again,

I'm working on this project again (after more than one month of
interruption).

I'm now using:

 - Restlet 1.1.3
 - curl 7.16.3
 - RESTClient 2.3
 - the same sample code as Avi (see link to his message below)

Here are the results with curl:

> time curl -X POST -d @test.txt http://localhost:3000/
Test
real    0m0.008s
user    0m0.003s
sys     0m0.003s

> time curl -0 -X POST -d @test.txt http://localhost:3000/
Test
real    0m0.009s
user    0m0.004s
sys     0m0.003s

So, no problem with curl, as previously mentioned.

Now, with RESTClient (HTTP 1.0): "Response received in 7 ms".

With RESTClient (HTTP 1.1): "Response received in 2003 ms".

That was my problem. It's perfectly reproducible. RESTClient uses HTTP 1.1
by default, which I previously hadn't realized. I don't know why curl
doesn't have the same problem, though.

At that point, I don't know if it's a bug in RESTClient or in Restlet. What
do you think?

Thanks,
Olivier

> I actually have the same problem as Avi here:
> 
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId
> =930917
> 
> Almost the same configuration, Mac OS 10.5.6. Internal HTTP server.
> 
> When handling POST/PUT requests, the Entity.getText() method takes 2
seconds to return a string.
> 
> Is there any solution to this problem, other than not using the internal
HTTP server?
> 
> Thanks,
> Olivier

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=12616
69

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1297031

Reply via email to