Article View: borland.public.cppbuilder.internet.socket
Article #2407Re: ConnectTimeout + Indy9 -> Slowdown?
From: Frank Gruber
Date: Tue, 25 Apr 2006 10:40
Date: Tue, 25 Apr 2006 10:40
31 lines
2313 bytes
2313 bytes
Remy Lebeau (TeamB) schrieb: > What EXACTLY do you consider "significant"? What are the actual numbers you > are seeing? See my second post. It's a 100 ms delay for every connect what I call significant. > In order to implement a connect timeout for a blocking socket, TIdTCPClient > has to spawn a worker thread to handle the timeout. Your performance issue > is likely caused by that. When the timeout is not used, and there is no > TIdAntiFreeze component on the form, then no thread is used at all. That explains what's going on. The app is a presentation server which receives http browser request and dynamically builds the html responses. The necessary data it queries from an applications server via multiple idhttp requests (xml over http). As there is a 100 ms delay for every connect (for spawning the required timeout thread) it all sums together to a noticeable delay. I should consider redesigning that part of the app to have one thread which is monitoring the connect timeout in all idhttp components of all other threads and avoid using the ConnectTimeout property. What do you think? What exactly is the ConnectTimeout for. I would assume it is for an incomplete "three way tcp handshake" but not sure about that? Thanks for you help. Frank.
Technical Details
Message-ID:
<444dfc73@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<444d23f3$1@newsgroups.borland.com> <444d4b56@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,726a735ed01da85d X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit Date: Tue, 25 Apr 2006 12:40:00 +0200 From: Frank Gruber <HVFDMIPUMFPS@spammotel.com> User-Agent: Thunderbird 1.5.0.2 (Windows/20060308) MIME-Version: 1.0 Newsgroups: borland.public.cppbuilder.internet.socket Subject: Re: ConnectTimeout + Indy9 -> Slowdown? References: <444d23f3$1@newsgroups.borland.com> <444d4b56@newsgroups.borland.com> In-Reply-To: <444d4b56@newsgroups.borland.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 83.236.157.18 Message-ID: <444dfc73@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1145961587 83.236.157.18 (25 Apr 2006 03:39:47 -0700) Lines: 31 Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail