The other, MUCH worse, is that searches for "" are not properly optimized away. With my config (slow machine, plenty of RAM but CPU starved, and 110,000 messages), this results in probably a 100-1000x performance hit, truly massive. I am really surprised that your machines are all so fast that this one isn't apparent. What's the slowest thing you use to test for performance regressions?
Umm, ok, so this goes back to the original suggestion - this is a thread contention issue.
So it has nothing to do with searching at all.
Please just get a backtrace, all this worrying about searching speed is just wasting our time.
