From bibiko@eva.mpg.de Wed Feb 27 12:11:30 2008 From: Hans-Joerg Bibiko To: textmate@lists.macromates.com Subject: Re: [TxMt] TM tokenizer is taking 100% CPU for long while using 100-200KB text files with single line Date: Wed, 27 Feb 2008 13:11:18 +0100 Message-ID: <1F3297FA-2D2E-4965-8933-924934EDD4CD@eva.mpg.de> In-Reply-To: <1F4CAF8E-0657-409F-AE59-A83DFD9446F3@java.pl> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1513256618758492615==" --===============1513256618758492615== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit On 27 Feb 2008, at 12:51, Adam Strzelecki wrote: > 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 "" x 20000}' > test.html > $ mate test.html If I do this test.html pops up in a second. My settings are Soft wrap is On AND! Check Spelling as you type is OFF. But then you get into troubles while editing. In such a case where a XML file contains only one long line I use a tiny perl script which replaces any closing tag by the closing tag itself plus '\n' before I pipe the text to mate. --Hans --===============1513256618758492615==--