Alright, just tried with the profiler and the big part of the problem should be solved by the patch here:

techee@a11f82b

It doesn't fix the slowness completely but at least it should fix the non-linear part of it. With about 4000 lines from your example about 75% of time was spent by rehighlighting the document. The remaining 25% were spent by the parser (I'm afraid we cannot do much with this).

If you are able to recompile, could you try the patch if it helps?


Reply to this email directly or view it on GitHub.