[TxMt] TM tokenizer is taking 100% CPU for long while using 100-200KB text files with single line

Adam Strzelecki ono at java.pl
Wed Feb 27 11:51:56 UTC 2008


Hello,

I've sent a mail to Allan regarding the problem, but I want to share  
also this problem with all of you subscribed to the TM list. Maybe you  
have also encountered this?

I'm working with few auto-generated FO (XML) files that have no line- 
breaks.

You can reproduce such dummy file with:
$ cd /tmp
$ perl -e '{print "<html></html>" x 20000}' > test.html
$ mate test.html

As you see TM gonna take 100% CPU for a really long-long while until  
you get syntax highlight.
Also any modification (line-break) causes TM to take again 100% CPU  
for a while.

I'm aware it is rare case to work with such files, but is there any  
remedy for this problem?
I have soft-wrap turned on, also using System Monitor I can see that  
it is tokenizer thread that is taking the whole CPU.

Regards,
-- 
Adam Strzelecki |: nanoant.com :|




More information about the textmate mailing list