Re: Java.net.SocketInputStream



On Apr 11, 3:48 am, Arne Vajhøj <a...@xxxxxxxxxx> wrote:
Vikram wrote:
    I am using java.net.SocketInputStream to read the Http response.
For the first read, it takes around 2 minutes, but for the subsequent
reads, it is very fast ( in ms). Where could be the problem ?

Impossible to say.

One possibility would be a very slow nameserver.

Arne

Following can be reasons :

1. DNS resolution time
2. First Byte download time ( origin process time )

In most cases the first responses are heavy and involves connection
setup. The subsequent connections will reuse the connection hence are
faster i.e if your protocol is HTTP/1.1.

Viks
.



Relevant Pages

  • Re: Timer gets stuck
    ... in the my connection to the POP service, but aren't the subsequent ... Canadian Mind Products, Roedy Green. ...
    (comp.lang.java.programmer)
  • Re: First Connection Open Slow from ASP.Net
    ... Are you sure you have isolated this to the Sql Server connection itself? ... First requests to aspx and asmx pages are always slower than subsequent ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Tcp concurrent connection limit in sp2
    ... TCP connection attempts. ... After the limit has been reached, subsequent ... connection attempts are put in a queue and will be resolved at a fixed rate. ... occur, a new event, with ID 4226, appears in the system's event log." ...
    (microsoft.public.windowsxp.security_admin)
  • Re: One template, three printers; pg1 letterhead, all others bond
    ... You can setup the bin to be used for first and subsequent pages in page ... no matter which tray it's found in. ...
    (microsoft.public.word.pagelayout)
  • Page setups for 1st and nth copy of print job
    ... Is there any way that when printing 2 or more copies of a document that the ... different page setup? ... bins than the subsequent copies. ... Prev by Date: ...
    (microsoft.public.word.general)