Fix Slow TextMate ‘Find in Project’ Search

I use TextMate’s ‘Find in Project’ search quite a bit. Recently, though, I found any ‘Find in Project’ search slowing to a crawl. Searching through a project took more than a minute and would meanwhile lock up TextMate completely. Horrible.
After tinkering around a bit, I figured out that TextMate was searching through binary files in the project as though they were text. When I removed some videos from the project, the search was back up to full speed. Must have been triggered after I tried dragging a video into TextMate. But how to restore peace?
I stumbled upon the fix several hours later after right-clicking on one of the video files in the project drawer. There at the bottom is a menu item you can select to make TextMate ‘Treat Files with “FLV” Extension as Binary‘!
Blam.
Thank you very much for this absurdly hidden but remarkably handy toggle. For me, TM was reading FLVs and PNGs as Text files, which brought search to an unusable halt.
Since I’ve got a few SQL dumps in our repository that never need to be searched, I’ve flagged them as binary as well.
If only we could batch flag filetypes now…
Posted by Eric Fields on April 20th, 2010