Subject Interbase v6.01 S-L-O-W on disconnect
Author KevinHerrmann
Recently, our app using Interbase v6.01 began to get S-L-O-W on
disconnect. I have checked google web and groups for help but came up
with something similar that seemed to fix itself.

I have an idea why, but I'd like some feedback before I pollute the
list with the wrong idea.

We installed W2K AS SP3 recently on our dev server. It runs IB v6.01.
Our dev machines use the 6.01 gds DLL. We use BDE 5.1.1. Each instance
of the program connects to 3 DBs: 10 MB, 16MB and 390MB or so. Stress
that this is code that's been running great for 5 years now, we
continuously enhance, but this is not a new development problem.

Everything runs fine until we get to this line in Delphi code

unit DBTables;
procedure TSession.CloseDatabaseHandle(Database: TDatabase);
DbiCloseDatabase(Database.FHandle); // THIS is the offender

It takes upwards of 90 seconds to disconnect from the 16 MB Database.
Now, if we replace the 390 MB DB with a smaller one, say 6 MB, it's
fast. Yeah, I know. It was starting to make sense up until that point.

* Delay only happens when we've altered data in the large DB
* replacing large DB with small one is much faster

We've done the following and seen same problem:
* Used old versions of code (so nothing introduced)
* Used BDE 5.1.1 or 5.2
* Installed fresh on new machine

Ok, I finally got so disgusted I started looking through the server's
Windows Services and noticed quite a few I hadn't noticed before that
were running. Auto update, Critical File BAckup, etc. etc.

I started shutting down ones I didn't recognize or figured were
unnecessary and WHAM! -- when I tested again, no hint of the problem
at all. No, I don't know which one did the trick as I tested after
disabling many, but I have some thoughts as to what may be going on,
but would really like some independent thoughts given the
circumstances presented above.