One small annoyance of using TextMate is how it refreshes the project tree when it regains focus. If you have a large source tree this can lead to waiting for many seconds while TextMate is frozen or showing the dreaded beach ball. Normally switching back from another application to TextMate has about a half second delay, but when the directory contents are changed it can be considerably longer when the project is large (presumably stat info is cached in the first case.) Our current project setup contains about 150MB of source code (including plugins and vendor’d rails) and a data directory that can be ~1GB, leading to some frustrating wait times.

Until the mythic TextMate 2 is released and fixes each and every TextMate issue, here are a few workarounds:

  1. Change Project Structure - Move that huge data directory out from under the project hierarchy. For some projects this might be harder than others, especially for those projects with very large source trees.
  2. ReMate - There are 2 version of ReMate, a plugin that disables the automatic refreshing of the project tree. The original version adds a menu item to Disable Refresh on Regaining Focus. This makes TextMate instantly responsive during app switching, but I can't get the option to remain enabled between TextMate sessions. And, obviously, changes made in the filesystem are not reflected in the TextMate project drawer and the manual Refresh All Projects menu item is broken as well. (This might be due to an interaction with ProjectPlus plugin.)

    The updated version of ReMate will disable automatic refresh for specific mounted volumes and is designed for those editing files over networked filesystems like SFTP or WebDAV.

  3. Remove Folder Reference - Within TextMate a folder pattern can be removed from the tree. The advantage over ReMate is to remove the huge data directory but still have TextMate automatically pick up other filesystem changes. This will only stick if you have a TextMate Project (right click on the top level directory > Show Information) or make the change globally (Preferences > Advanced > Folder References). Within the dialog modify the Folder Pattern regular expression to exclude the "big_data" directory like:
    !.*/(\.[^/]*|CVS|big_data|.*~\.nib|.*\.(xcode(proj)?))$
    
    After making this change TextMate should be much snappier when bouncing between TM and other applications. </ol>