[TxMt] Interesting text coloring (massive) slowdown

Allan Odgaard allan at macromates.com
Mon Sep 5 19:52:27 UTC 2005

On 04/09/2005, at 22.06, Luc Heinrich wrote:

> [...] then simply try to scroll down and notice how it brings  
> TextMate to its knees.
> Allan, if you don't have DarwinPorts installed, here are some more  
> details. The 'port' command file starts with this:

I have the file -- the problem is that the shell syntax will match  
{ ...; } blocks (recursively), but for e.g. Tcl there's no ; in front  
of }, so instead it keeps nesting the groups, and that means that  
basically every scope in the file is unique, and the caching won't work.

Without caching, it's pretty slow to lookup styles and preferences  
for a scope, because of the many rules, and the non-trivial matching  
of scope selectors. When the system has matured, I can probably  
create a smart data structure for this, and stop using Cocoa as my  
container classes ;)

More information about the textmate mailing list