carlhuda/bundler — pull request #1656 by osheroff (2012-02-11 04:17:20+00:00)
Title: only clear search cache on conflict

d737c128e68bd47e8631ca8105d8c38f1a7ebb68 introduced a pretty bad performance regression in resolving our rather large Gemfile -- ~4-5 seconds up to 27(!) seconds to do `bundle show activerecord`. I bisected the problem down to these lines.

I think this patch reflects the original intent of the code -- if we reach the code below the catch() block, we've hit a conflict, so clear the cache. If we throw :success, the clear_search_cache code will never be hit.