Page 1 of 1

Strange TCRBatchMove Progress and very slow behaviour- Fmx

Posted: Fri 19 Oct 2018 07:06
by starhu
Zsolt Csillag - StarSoft <[email protected]>
Wed 17 Oct, 10:53 (2 days ago)
to support

Hello,

I use CRBatchMove to copy from MySql to LiteSql.

The problem is that the progress starts, and when it ends at 100%, it drops to about 70% (this varies, sometimes 71, sometimes 79 etc) and starts counting again. This can repeat 5-8 times.
It is also very slow. I copy about 5 000 records and it processes in about 20 minutes!

First of all the customer is confused, second, I don't know if the counting is bad, or it actually processes the import twice?

Here is the code:
MySqlDataSet.FetchAll := False;
MySqlDataSet.FetchRows := 1000;

SqliteDataset.;
MySqlDataSet.;

{$REGION 'CRBatchMove'}
With CRBatchMove Do
Begin
Mode := bmAppend; //bmAppend, bmUpdate, bmAppendUpdate, bmDelete bmUpdate
FieldMappingMode := mmFieldIndex; //mmFieldIndex mmFieldName
OnBatchMoveProgress := OLF_Objektum.BatchMoveBatchMoveProgress;
CommitCount := 0; // 1000
Source := MySqlDataSet;
Destination := SqliteDataset;
FmxDebugToFile('CRBatchMove Termék'+#13);
Execute;
End;
{$ENDREGION}
procedure t_OLF_Objektum.BatchMoveBatchMoveProgress(Sender: TObject; Percent: Integer);
begin
MainForm.HTMLTextProcess.Text := '<BODY bgcolor="clYellow"> <b>'+OLF_Objektum.BatchMove_AktualisTabla +' frissítés:'+IntToStr( Percent)+'%</b>';
Application.ProcessMessages;
end;

Thank you for your help!

Re: Strange TCRBatchMove Progress and very slow behaviour- Fmx

Posted: Tue 23 Oct 2018 10:41
by MaximG
Unfortunately, the provided information is not enough to reproduce and investigate the issue in our environment. Please, in order to investigate the issue, compose and send us a small sample, execution of which causes the mentioned problem. Additionally, we will need DDL script of MySQL table used in this sample, as well as a sample of its filling with data.
It is convenient to do using the e-support form https://www.devart.com/company/contactform.html