Slow closing of the connection
Posted: 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 )
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 )