I haven't needed to tweak mine for similar reasons, but I'm surprised to hear that the "code that triggers the searches" is slow. Are you referring to something in Open WebUI?
I have no idea how well Ollama's works, but I haven't ran into any issues with SearXNG. The alternatives aren't worth paying for in any use case I've encountered.