Page 1 of 1

optimization request

Posted: Wed 10 Sep 2008 06:57
by Ludek
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.

Posted: Thu 11 Sep 2008 07:39
by Dimon
Thank you for the advice. We will add this optimization code in the next SDAC build.