response slowly when remove series from lots of series
Posted: Tue Jun 03, 2014 10:24 am
As the code showing below,
I want to remove series spedified from 1500 series.
The series deleting didn't take much time...
but the code behind it didn't show until 2-3 seconds later..
Please find the attachment for the example project.
I want to remove series spedified from 1500 series.
The series deleting didn't take much time...
but the code behind it
Code: Select all
(ShowMessage(diff);)
Please find the attachment for the example project.
Code: Select all
__fastcall TForm12::TForm12(TComponent* Owner)
: TForm(Owner)
{
int count = 1500;
int datalen = 200;
for (int i = 0; i < count; i++)
{
TFastLineSeries* series = new TFastLineSeries(Chart1);
series->ParentChart = Chart1;
series->DrawAllPoints = false;
series->FastPen = true;
series->FillSampleValues(datalen);
}
}
void __fastcall TForm12::btnRemoveClick(TObject *Sender)
{
DWORD dwBegin, dwEnd;
dwBegin = dwEnd = GetTickCount();
// Remove the series specified by "edtSeriesNo"
int no = edtSeriesNo->Text.ToInt();
delete Chart1->Series[no];
dwEnd = GetTickCount();
DWORD diff = dwEnd - dwBegin;
// The result of "diff" is about 0,
// but the MessageBox showed about 2-3 seconds later
ShowMessage(diff);
}