perf(search): scan history by recency until N unique (#3553)