With version sdac 4.0 the start process goes 4 times more slowly than with the version 3.02

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
hauiclaudi
Posts: 12
Joined: Thu 07 Jun 2007 21:52

With version sdac 4.0 the start process goes 4 times more slowly than with the version 3.02

Post by hauiclaudi » Thu 07 Jun 2007 22:03

My Application with version 3.02 needs about 30 seconds to start. Now with the version 4.0 I must wait about 120 seconds. I have changed no parameter. The app start with 50 tables. What can I do?

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 08 Jun 2007 09:09

Please specify, do you mean the time for loading your project in IDE, or the time when the application buld from your project starts?

hauiclaudi
Posts: 12
Joined: Thu 07 Jun 2007 21:52

Post by hauiclaudi » Fri 08 Jun 2007 12:37

After I compiled it and then I start the application (*.exe).

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 08 Jun 2007 14:43

Please try to determine what SDAC functionality caused such performance loss, and send us, if it is possible, a complete small sample project that demonstrates this problem, including script that creates server objects for the test project.

Also specify the following information:
- exact version of Delphi, C++Builder or Kylix you are using;
- exact version of MyDAC. You can see it in the About sheet of TMyConnection Editor;
- exact version of MySQL server and MySQL client. You can see it in the Info sheet of TMyConnection Editor.

hauiclaudi
Posts: 12
Joined: Thu 07 Jun 2007 21:52

Post by hauiclaudi » Fri 08 Jun 2007 15:31

I'm working with Delphi 7 Build 8.1 with all SP
MS SQL Server 2000 with all SP
MDAC Version 2.81.1117.0
SDAC Version 4.000.0.7

It's not possible to send you this project.


procedure dm1.datamodulecreate ...
begin
MSLogin.active := true ;
MSConnection.connected := true ;
// So I Start ~ 50 TMSTables
MSTAble1.active := true ;
MSTable2.active := true ;

//and so on

end

all MSTable with fetchall := true ;
fetchrows := 5 ;

In Version SDAC 3.00.02 the app starts on the Desktop after 30 sec. and with 4.000.0.7 after 120 sec.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 08 Jun 2007 16:20

Please check the value of TMSConnection.Options.Provider. If it is set to prAuto or prNativeClient, change it to prSQL, and try to run your application again.

hauiclaudi
Posts: 12
Joined: Thu 07 Jun 2007 21:52

Post by hauiclaudi » Fri 08 Jun 2007 16:40

I set Provider to prSQL.
But the result is not better. ;-(
200 sec!

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 11 Jun 2007 09:07

Please note down the connection time, and the open time for each table you open. A way to do this is to make a method that writes to a log file the object name, and time taken from the QueryPerformanceCounter method, and assign this method to BeforeOpen and AfterOpen events of every TMSTable component.
Build your application with SDAC 4 and run it to create the log file. Repeat the same with SDAC 3, and compare these files. This should help to determine what object(s) causes this problem.

yeohray
Posts: 56
Joined: Mon 26 Mar 2007 01:25

Post by yeohray » Tue 12 Jun 2007 04:56

You could also use SQL Profiler to log what queries are running during startup, together with the duration of each query, for both versions of SDAC. Then compare the trace results.

This way, you don't have to modify your code (yet).

Post Reply