View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005709 | JEDI VCL | 00 JVCL Components | public | 2011-11-13 09:33 | 2013-12-13 11:29 |
Reporter | Karlheinz | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | suspended | ||
Platform | OS | Win7 64bit | OS Version | ||
Product Version | Daily / GIT | ||||
Target Version | Fixed in Version | ||||
Summary | 0005709: Very slow behavior of procedure TJvDBCustomSearchComboBox.ReadList; | ||||
Description | I use TJvDBCustomSearchComboBox in my application with ElevateDB. The loas of the List is very, very slow. Maybe it has soemthing to do with the new Bookmark handling since d12. My Dataset has arround 6000 records and it takes at an i5 processore around 5 seconds to read the list. | ||||
Tags | No tags attached. | ||||
|
A test project with a memory ClientDataSet with 6000 records didn't show me the performance hit that you experience. Despite, I made some small changes to the control like putting a BeginUpdate/EndUpdate block around the ReadList method and moving the FieldByName call above the loop, so it is executed only once. |
|
I have added with Codesite the following time log. Below you can see the procedure with the codesite lines. begin14:32:14 direct after try 1 14:32:14 direct after try 2 14:32:14 direct before while start 14:32:14 direct after while end 14:32:17 begin14:32:17 direct after try 1 14:32:17 direct after try 2 14:32:17 direct before while start 14:32:17 direct after while end 14:32:19 direct before end of finally 2 14:32:19 direct before end of finally 1 14:32:19 direct after end of try finally 1 14:32:19 End 14:32:19 direct before end of finally 2 14:32:19 direct before end of finally 1 14:32:19 direct after end of try finally 1 14:32:19 End 14:32:19 procedure TJvDBCustomSearchComboBox.ReadList; var Bmrk: {$IFDEF RTL200_UP}TBookmark{$ELSE}TBookmarkStr{$ENDIF RTL200_UP}; N, CurIndex: Integer; DataSet: TDataSet; Field: TField; begin CodeSite.Send('begin'+TimeToStr(now)); if (FDataLink.DataField = nil) or (FDataLink.DataSet = nil) or not FDataLink.DataSet.Active then Exit; Items.BeginUpdate; try CodeSite.Send('direct after try 1 '+TimeToStr(now)); DataSet := FDataLink.DataSet; ClearList; CurIndex := -1; Bmrk := DataSet.Bookmark; DataSet.DisableControls; N := 0; try CodeSite.Send('direct after try 2 '+TimeToStr(now)); Field := DataSet.FieldByName(FDataLink.FDataFieldName); DataSet.First; CodeSite.Send('direct before while start '+TimeToStr(now)); while not DataSet.Eof do begin // CodeSite.Send('while not dataset.eof begin and N =' + IntToStr(N) + ' ' + TimeToStr(now)); FBookmarks.Add(DataSet.GetBookmark); Items.AddObject(Field.DisplayText, TObject(FBookmarks[N])); if {$IFDEF RTL200_UP}DataSet.CompareBookmarks(DataSet.Bookmark, Bmrk) = 0{$ELSE}DataSet.Bookmark = Bmrk{$ENDIF RTL200} then CurIndex := N; Inc(N); DataSet.Next; end; CodeSite.Send('direct after while end '+TimeToStr(now)); DataSet.Bookmark := Bmrk; finally DataSet.EnableControls; CodeSite.Send('direct before end of finally 2 '+TimeToStr(now)); end; finally Items.EndUpdate; CodeSite.Send('direct before end of finally 1 '+TimeToStr(now)); end; CodeSite.Send('direct after end of try finally 1 '+TimeToStr(now)); ItemIndex := CurIndex; CodeSite.Send('End '+TimeToStr(now)); end; |
|
Any progress here? |
|
Any news? |
|
No news, suspending the issue |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-11-13 09:33 | Karlheinz | New Issue | |
2011-11-13 11:06 | AHUser | Note Added: 0019110 | |
2011-11-13 11:06 | AHUser | Status | new => feedback |
2011-11-13 14:42 | Karlheinz | Note Added: 0019111 | |
2012-02-22 14:46 | obones | Note Added: 0019443 | |
2012-06-13 16:28 | obones | Note Added: 0019967 | |
2013-12-13 11:29 | obones | Note Added: 0020782 | |
2013-12-13 11:29 | obones | Status | feedback => resolved |
2013-12-13 11:29 | obones | Resolution | open => suspended |
2013-12-13 11:29 | obones | Assigned To | => obones |