first of all: congrats for this new search box!
I noticed that you use action=query with both generator=prefixsearch and
IIRC when we looked at this (it was when we looked at the way some API
consumers generates their requests) we noticed that it generates 2
prefixsearch queries on the backend. I think this adds unnecessary latency.
Unfortunately I don't know why you need to use list and generator at the
same time, is this a limitation of the API?
If we can't fix the API call could we work on a cache at the backend
level to avoid 2 elasticsearch queries?