More info, and a workaround …
I looked in to the Index directory, as identified by opensnoop (see my previous post), and found a LOG file with these log entries (a new block of entries every second):
2013/08/29-06:52:24.942541 10f699000 Compacting 19@0 + 3@1 files
2013/08/29-06:52:26.742562 10f699000 compacted to: files 19 5 0 0 0 0 0 ]
2013/08/29-06:52:26.742723 10f699000 Delete type=2 #400
2013/08/29-06:52:26.743659 10f699000 Compaction error: IO error: /Users/datihein/Library/Application Support/Sublime Text 3/Index/000062.sst: Invalid argument
2013/08/29-06:52:26.743692 10f699000 Waiting after background compaction error: IO error: /Users/datihein/Library/Application Support/Sublime Text 3/Index/000062.sst: Invalid argument
2013/08/29-06:52:27.744794 10f699000 Compacting 19@0 + 3@1 files
2013/08/29-06:52:27.855327 10f699000 compacted to: files 19 5 0 0 0 0 0 ]
2013/08/29-06:52:27.855470 10f699000 Delete type=2 #401
2013/08/29-06:52:27.944136 10f699000 Compaction error: IO error: /Users/datihein/Library/Application Support/Sublime Text 3/Index/000062.sst: Invalid argument
2013/08/29-06:52:27.944185 10f699000 Waiting after background compaction error: IO error: /Users/datihein/Library/Application Support/Sublime Text 3/Index/000062.sst: Invalid argument
On a hunch, I shutdown ST3 and renamed the Index directory to Index.save and then created a new, emtpy, Index directory. Then I restarted ST3 and now it idles along at 0.2% CPU. Much better.
So there is some kind of defect in the code that isn’t handling an error condition properly, causing the indexing to restart after the error. Repeat ad naseum.
FYI, the file it complains about – 000062.sst – is a zero-length file, dated a few months ago.
Bottom line: there is a bug in error handling in the indexing, but you can workaround the bug by clearing out the Index directory if you notice ST3 consuming a lot of CPU when idle for a long time (many minutes).