6
votes

Data processing with XE3 programs take up to 10 times more than with same programs compiled with XE2. This is known issue (probably refers mainly to TStringField), reported to QC 111942, but it is not fixed yet. Does anybody have a fix / workaround for this issue?

TIA Branko

1
IMHO your only hope is to downgrade or use some third party memory table componentuser497849
@ComputerSaysNo - the issue is not TClientDataset specific, I don't even use CDSBranko

1 Answers

0
votes

Same in XE5. Plus extra traffic and all this client-server thing require >5 Mbit per second (!) to work normally. I am using only TFDConnection and TFDQuery. Specially for MySQL the speed is the same with Delphi components and with third-party driver (libmysql.dll). If you have no FireDAC you can replace TFDQuery with TSQLQuery. Here is a procedure how to fill a string grid:

procedure SelGrid(sql:ansiString;Q:TFDQuery;grid:TStringGrid);
var i: integer;
begin
  Q.Close;
  Q.SQL.Text:='';
  Q.Open(sql);
  grid.ColCount:=Q.FieldCount;
  grid.RowCount:=1;
  while not Q.Eof do begin
    for i := 0 to grid.ColCount-1 do grid.Cells[i,grid.RowCount-1]:=Q.Fields.Fields[i].AsString;
    grid.RowCount:=grid.RowCount+1;
    Q.Next;
  end;
  Q.Close;
  if grid.RowCount>1 then grid.RowCount:=grid.RowCount-1;
  grid.Row:=0;
  //AutoSizeGridColumns(grid,30,200);
end;

This is VCL string grid. Of course you muse deal with updates and so on, but you'll have no more performance problems.