I have a search on a gallery where the SP list is over 40k and performs brilliantly as there are no delegation issues.
My search is done on three dropdowns and three textinputs. What I do is with the dropdowns have the value popolate hidden labels and with the text boxes just use them directly. Two of the textboxes are based on Numeric, where the data entry is unique so they are searched only on their values. The Dropdowns and last text box allow for multiple column searches. My Gallery Filter is simple:
If(isNumeric(TextInput1.Text),
Filter(Source,ID=Value(TextInput1.Text)),
If(isNumeric(TextInput2.Text),
Filter(Source,ID2=Value(TextInput2.Text)),
Filter(Source,StartsWith(ColumnInSource,Label1.Text) And StartsWith(ColumnInSource,Label2.Text) And StartsWith(ColumnInSource,Label3.Text) And StartsWith(ColumnInSource.TextInput3.Text)))
So the above, If one of the textinputs are populated wth a number, does them first then looks at the dropdowns.
I make the dropdowns more efficient by having an "ALL" and the first selection and then I make the text for the label to be: If(Dropdown?.Selected.Value="All","",Dropdown?.Selected.Value) This makes the Label blank so the StartsWith in teh filter shows all. It also means I can filter based on one or all of the dropdowns. Hope that makes sense
Note the third textinput is used in the search with the dropdowns. If that was a surname search, it will find only surnames etc if the the dropdowns are all set to "ALL"
My search results and nearly instant,