garybernhardt/selecta — pull request #51 by ggilder (2014-08-05 06:47:33+00:00)
Title: Performance improvements

Hi @garybernhardt , I love selecta and have been using it a lot lately, and noticed a few areas where performance could be easily improved. These primarily help in repos with > 10k files (I have the misfortune of working in large Java repos), but the improvements are noticeable (to me) even on smaller repos. I estimate at least a 20% total speedup from these changes, more depending on how much one is navigating the file list instead of adding to the query.

That said, I understand that performance is not necessarily the primary goal of this project, so let me know if any of these optimizations feel too heavy-handed, and feel free to cherry-pick. (The search command optimization, for instance, seems like a pure win to me.)

Thanks again!