If I use many elements (100-1000) for the SearchTemplate, then I have to wait more than 100ms. Is it possible to somehow speed up this process? Also, the time depends on different devices, the older the device, the longer the list is displayed.
I've used Spinner for a lot of elements, but Spinner doesn't have the convenience of searching like SearchTemplate. Is it possible to add search to Spinner somehow?
Yes, I tested this on a mod release. Yes, you're right, 100ms is not enough. But visually it looks like the program freezes and then displays the list. If I load an array with more than 1000 elements, this time will increase to 1s on old devices.
This is a solution, but my list may change after the layout is loaded. It also does not solve the problem when I need to substitute different lists in the SearchTemplate during the program execution ...
Building the index of a large list takes time and it needs to be done properly if the lists are large.
You will note that you can store the generated index and set the items with SetIndex. This will be very fast and will allow you to replace lists without building the index again.
Another option, relevant in case where you have several predefined lists, is to store the serialized index and load it asynchronously with B4XSerializator.