TWebDBLookupComboBox performance problem

Is there a way to make this component perform better. I used your web demos basic DBLookupCombo demo and added 3200 items to the country table using the code below (load took 58397 ms).

Why did I do this ? Because I need to use this component in my application for lookup to company table which may have over 5000 records. Due to the performance issue I am unable to use it.

The same problem is in the WebDBComboBox items assignment. If Items is populated with Items.add() the performance is very bad. However if a stringlist is build with the values and then Items.Assign(Stringlist) is used then it performs very good.

for I := 5 to 3200 do begin
webclientdataset1.Insert;
webclientdataset1.FieldByName('ID').AsInteger := I;
webclientdataset1.FieldByName('Country').AsString := 'USA '+inttostr(I);
webclientdataset1.Post;
end;

Thanks for reporting.
We applied an improvement that addresses this and that will make the list load as fast as you experience with directly assigning a stringlist.
This improvement will be in the next update.

Thanks for responding.
I assume this fix is not in v1.8.4.0.

Fix was implemented just after 1.8.4.0 release.
We will send an incremental source update by direct message.

WebDBLookupComboBox works great now. Thanks.

How about WebDBComboBox problem ? Is there a fix for that also?

Fill large amounts of items with:

var
 i: integer;
begin
  webdbcombobox1.items.BeginUpdate;
  for I := 0 to 1000 do
  begin
    webdbcombobox1.items.Add('item '+i.ToString);
  end;
  webdbcombobox1.items.EndUpdate;
end;

It works the way you showed. In our test we have put beginupdate and endupdate for the webdbcombobox1 not it's items. It does not perform that way.

Thanks.

If a problem persists, please isolate it and send a sample source project with which we can reproduce this here, so we know the exact code & settings you are using.

The performance of this code is very bad

var
i: integer;
begin
webdbcombobox1.BeginUpdate;
for I := 0 to 1000 do
begin
webdbcombobox1.items.Add('item '+i.ToString);
end;
webdbcombobox1.EndUpdate;
end;

However Your sample code works sufficiently fast. One has to remember to apply BeginUpdate to Items property and not webdbcombobox1.

This is not a problem if you know the correct usage.

Adding BeginUpdate to Items ensures that the control list is not rebuilt for every item added but only once after the items have been filled.