Page 1 of 1

Slow closing of the connection

Posted: Sun 05 Oct 2008 14:25
by ddeberla
Hi,

I'm using dbexpress dbexpmda40.dll / 4.20.4 in Delphi 2007 for a year.
Whenever the last connection is closed from the application, it takes some 5secs to unload the above .dll.

In debug, the statetement that takes the time is
' TDBXDriverRegistry.DBXDriverRegistry.FreeDriver(Self); '
in DBXCommon.pas

Sofar, I didn't investigate further because it's only a bit 'annoying' when leaving the application but now I would like to see if this can be improved.

See:
procedure TDBXDriver.RemoveReference;
begin
TDBXDriverRegistry.DBXDriverRegistry.FDrivers.LockList;
try
dec(FReferenceCount);
if FReferenceCount < 1 then
TDBXDriverRegistry.DBXDriverRegistry.FreeDriver(Self);
finally
TDBXDriverRegistry.DBXDriverRegistry.FDrivers.UnLockList;
end;
end;

Mysql Server is 5.1.22. Client lib is 5.0.11

Any ideas what might be causing this ?


Regards
Dirk

PS I can' t test with the latest version because the trial expired.
PS2 I have a small test app ( just a TSQLConnection with button connect and disconnect )

More info

Posted: Sun 05 Oct 2008 14:57
by ddeberla
I also tried the following :
When I add a SQLConnection with the 'direct' driver, the issue does not occur. And when I have both in the same application ( 1 through clientlib and 1 direct ), even the one with clientlib disconnects fast ( when being the last connection ), as long as the 'direct' has been connected/disconnected at least once before...Very strange.

regards
Dirk

Posted: Tue 07 Oct 2008 12:24
by Dimon
Please send me a complete small sample at dmitryg*devart*com to demonstrate this problem.