Slow closing of the connection

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for MySQL in Delphi and C++Builder
Post Reply
ddeberla
Posts: 9
Joined: Fri 26 Oct 2007 16:20

Slow closing of the connection

Post by ddeberla » Sun 05 Oct 2008 14:25

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 )

ddeberla
Posts: 9
Joined: Fri 26 Oct 2007 16:20

More info

Post by ddeberla » Sun 05 Oct 2008 14:57

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

Dimon
Devart Team
Posts: 2885
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 07 Oct 2008 12:24

Please send me a complete small sample at dmitryg*devart*com to demonstrate this problem.

Post Reply