2

I am investigating a problem with a legacy executable, written in Delphi 5, utilising Indy 9.

Components in use: TIdHTTP, TIdConnectionIntercept & TIdSSLIOHandlerSocket.

The problem the app is presently experiencing is slow responses to TIdHTTP POSTs.

I found the following two links:

Delphi: Why does IdHTTP.ConnectTimeout make requests slower?

Delphi TIdHTTP POST is very slow vs GET

Based on the links, I have tried the suggestions of: (i) setting ConnectTimeout to zero and (ii) setting the HTTPOptions flag hoKeepOriginalProtocol, however behaviour remains the same.

SSL is in use, with no TIdAntiFreeze in use.

I have also tried using a test executable written in C# utilising .NET ServicePoint and ClientBase (using DNS name rather than IP address,as suggested in one of the above links), with no lag whatsoever.

Is there anything further I can check/try? The above links refer to 'old' versions of Indy - what is the latest version I am able to implement within Delphi5?

Community
  • 1
  • 1
CoastalB
  • 695
  • 4
  • 15
  • Delphi 10.6 (the current version) or the last 10.5.9 still should be compatible with Delphi 5, I would write a tiny test app to compare the POST response time – mjn Jun 16 '13 at 19:46
  • I was going to suggest using an IP Address instead of DNS Name, but it appears you've already tried. I've had issues in connection time due to slow DNS responses. – Jerry Dodge Jun 16 '13 at 19:56
  • 1
    Using an up-to-date version of Indy, make sure the `hoWaitForUnexpectedData` flag is disabled in the `TIdHTTP.HTTPOptions` property. If you are still encountering slowness, then you need to profile your app to find out exactly where it is spending its time. – Remy Lebeau Jun 17 '13 at 16:34
  • Before I start tinkering with Indy10 from SVN / overhaul of our projects using Indy9, I thought I'd double check the environment in which the application has been suffering the lag. The app's been running for years with no lag at all our sites - only difference with this site to all other non-lagging sites, is the server is running a later version of their SOAP API. I've eliminiated all hardware/network issues by running a C# app utilising HttpWebRequest, which is super quick. I just want to make sure there are no other changes I can make in existing Indy9 setup before an overhaul... – CoastalB Jun 18 '13 at 10:47
  • OK - I have now upgraded to Indy 10.5.8 XE2, made the relevant upgrade changes (including upgrade of OpenSSL DLLs) and the behaviour remains the same. Are there any other options (in TidHTTP, TIdConnectionIntercept or TIdSSLIOHanlderSocketOpenSSL) that can be tweaked? – CoastalB Jun 19 '13 at 19:10
  • 1
    To conclude this question - I never did get Indy to work on Delphi , hence re-wrote app in C#. – CoastalB Oct 04 '13 at 11:13

0 Answers0