[TxMt] feature request: timeout on highlighting
Allan Odgaard
allan at macromates.com
Sat Dec 4 02:47:32 UTC 2004
On Dec 2, 2004, at 14:23, Brian Lalor wrote:
> I just opened a 1.5M XML document in TM. My XML syntax isn't all that
> lean, and it takes a while for TM to highlight everything and become
> responsive.
Exactly what is slow? TextMate does lazy parsing of the file, so it
won't parse more than what's required to display the visible portion
(that's basically everything from the first line to the last visible
line -- and it caches previously parsed lines).
So generally (i.e. when the caret isn't saved as meta data and/or is
not placed way down in the file) syntax highlight shouldn't affect
loading time -- but it does affect scroll times (for the first time you
scroll through the document).
Scanning for folding markers OTOH is not lazy, and that's currently the
(huge) bottleneck in loading files -- I did improve it slightly, which
is what broke the open files folded, but it still does a scan of the
entire file. You can disable foldings in the View -> Gutter menu, and
it should significantly improve loading times (relative to file size
and computer speed of course).
Long term scanning for folding markers will be lazy and I'll try to
have SH parsing and folding scanning done in separate threads, and
display text even before these complete, so that load/scroll will be
“instant”, but then at times with styles/folding markers appearing with
a slight delay.
More information about the textmate
mailing list