I created a workflow for Alfred for searching DuckDuckGo and automatically displaying the results in the window, with a script filter.
It takes ~4 seconds to start from Alfred. It takes 0.506s to return the results in Terminal, so this looks like an Alfred problem.
(Subsequent times, as I add to the query, it runs in under a second again, so I don't know what's going on). Also, if I use it and then use it again quickly, that extra wait time doesn't happen. It would be nice to at least allow the cache to live longer if that's possible, but I have no idea what is being cached.