optimization request

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Ludek
Posts: 301
Joined: Thu 12 Oct 2006 09:34

optimization request

Post by Ludek » Wed 10 Sep 2008 06:57

please, could you optimize the class procedure

Code: Select all

class procedure TOLEDBConnection.AssignFieldDescs(Source, Dest: TFieldDescs);
?

simply add capacity setting:

Code: Select all

class procedure TOLEDBConnection.AssignFieldDescs(Source, Dest: TFieldDescs);
var
  i: integer;
  Field, FieldSource: TOLEDBFieldDesc;
begin
  Dest.Clear;
  dest.Capacity := source.Count; // THIS ROW WANTED
  for i := 0 to Source.Count - 1 do begin ..
I'm having serious unexplainable problems in resizing the dest internal array after adding of 5th item with TD2006, active runtime-packages and FastMM fulldebugmode...

Thanks a lot.

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

Post by Dimon » Thu 11 Sep 2008 07:39

Thank you for the advice. We will add this optimization code in the next SDAC build.

Post Reply