[TxMt] Latest TM version activation delays

Allan Odgaard throw-away-1 at macromates.com
Tue Dec 20 20:58:23 UTC 2005

On 20/12/2005, at 21:13, Gerd Knops wrote:

> Shark indicated almost all of the time was burned up in lstat and  
> in the underlying kernel routines. 'fs_usage -f filesys' confirmed  
> that on activation the TextMate process performs 3432(!!!) lstat  
> calls. For each file in my (static) project it does a lstat for  
> every single path component, eg for the file /a/b/c/d it performs  
> lstat calls for /a, /a/b, /a/b/c and /a/b/c/d. And the root of my  
> project starts 6 levels deep in the file system...

I had forgotten that even for a static project, I still call  
NSFileManager's fileExistsAtPath: on re-activation, to detect if any  
files has gone AWOL since last use (I'll be sure to also do that lazy/ 
async. in 1.2).

I can easily swap the code with something more low-level as a quick  
fix, but I'm too pressed for time to experiment with this myself  
(benchmarking the alternatives etc.).

More information about the textmate mailing list