Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0005709 [JEDI VCL] 00 JVCL Components minor always 2011-11-13 09:33 2013-12-13 11:29
Reporter Karlheinz View Status public  
Assigned To obones
Priority normal Resolution suspended  
Status resolved   Product Version Daily / GIT
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.
Additional Information
Tags No tags attached.
Attached Files

- Relationships

-  Notes
(0019110)
AHUser (developer)
2011-11-13 11:06

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.
(0019111)
Karlheinz (reporter)
2011-11-13 14:42

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;
(0019443)
obones (administrator)
2012-02-22 14:46

Any progress here?
(0019967)
obones (administrator)
2012-06-13 16:28

Any news?
(0020782)
obones (administrator)
2013-12-13 11:29

No news, suspending the issue

- Issue History
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


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker