Filter-Dropdown-Performance with >20k entries? (possible Codechange suggestion + question)

In our grid there is a column, which has around 30k different entries. We have set "FilterDropDownAuto=true". If we open the filtering, the dropdown takes ages to open and if we click on an entry in the Dropdown-Filter it again takes a while and then just closes the filter.

One reason for that might be:
In "TAdvStringGrid.GetFilter()" there is a stringlist "chklist" (Line 14646 in AdvGrid.pas) which only checks, if an entry has already been added.I think there would be a good performance increase, if you use a tdictionary<String, x> or thashset for that. Also the ".sorted = true" of the Stringlist doesnt seem to do anything, or?

Otherwise: do you have any example of a "working" grid, which has several thousand of entries in a column-dropdown and works quite well?

Thanks!

We investigated this and the performance issue is not in this part.
We've seen that the performance issue is related to
FFilterList.CustomSort(StringListCompareLogical);
which is used to perrform sorting taking numeric values in account instead of plain alphabetical sort.
We now made the algorithm smarter and that leads to a significant performance improvement. This improvement will be in the next release.

Great! Thank you very much for the quick answer and solution!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.