[TxMt] Huge files in Textmate ( ***long*** )

Allan Odgaard throw-away-1 at macromates.com
Tue Mar 28 13:10:39 UTC 2006


On 28/3/2006, at 14:49, Afternoon wrote:

>> So how long does it (roughly) take?
> Slightly under a second. The window is shown with uncoloured text  
> and the register window is shown. Nothing happens to the text until  
> I click later.

The registration window runs a modal event loop, basically blocking  
other events.

It has to parse the text using NFA-based regular expressions (not an  
efficient parser written/generated for the grammar), and it assigns  
colors to the text using a scope selector system.

So while it can probably be made faster down the road, taking up to a  
second is likely not indicative of any performance problem  
(especially since it’s threaded), it’s just the price to pay for the  
flexibility this system provides.




More information about the textmate mailing list