It took me a while this morning to figure out why ST2 started hanging when I was using Find in Files, using 100% CPU and several gigs of memory before I used “force quit”. It was because of some large files in my directory.
Now I know the that you can exclude files matching a pattern by using a config setting, but it’s kind of too late and ST2 provides no help to determine which files are causing the issue.
Some suggestions:
- Ignore big files for some configurable definition of big
- Read the files in chunks and stop after N matches to prevent runaway finds
- Optional binary file exclusion by using the results of the file command instead of exclusion list
- Optional exclusion of files with very long lines (minimised javascript)