On Dec 3, 2004, at 9:47 PM, Allan Odgaard wrote:
Scanning for folding markers OTOH is not lazy, and that's currently the (huge) bottleneck in loading files
That's probably what I'm seeing; that or just the time it takes to load a 1.5M file. Most files I work with are quite a bit smaller.
My XML syntax is here[1], and the folding properties are: foldingStartMarker = "^\s*(<[^!?%/](?!.+?/>)|<[!%]--(?!.+?--%?>)|<%[!]? (?!.+?%>))\s*$"; foldingStopMarker = "(</[^?]+?>|[/%]>|-->)\s*$";
This is supposed to start folds on the following text: <!-- <%-- <% <%! <foo> ... but not if the line looks like this: <!-- --> <%-- --%> <% %> <%! %> <foo /> <foo></foo>
It's not exactly lightweight; I'd think I'd prefer to see a more flexible folding-marker system that would allow me to define pairs of start/end markers. That keep blocks like <!-- --%> from getting folded.
[1] http://telly.bravo5.org/svn/repos/TextMate/trunk/Bundles/XML.tmbundle/ Syntaxes/XML.plist