[SVN] OCaml syntax highlight SLOW

David Powers david at grayskies.net
Tue Oct 10 10:47:52 UTC 2006


Sorry, I've been offline for about a week now so I missed the
beginning of this.  I am primarily responsible for the OCaml grammar,
which has proven somewhat difficult to keep light in performance due
to the terse nature of OCaml syntax.  If I get a chance I will grab
the two files you posted and look to see if there are any obvious
places I can speed it up.

-David


On 10/9/06, Benjamin Ylvisaker <benjaminy at fastmail.fm> wrote:
> On Tue, 10 Oct 2006 03:15:28 +0200
> Allan Odgaard <throw-away-1 at macromates.com> wrote:
>
> > On 10. Oct 2006, at 02:14, Benjamin Ylvisaker wrote:
> >
> > >> 2.0 will have a somewhat faster parser, until then I am afraid your
> > >> only options are to simplify the OCaml grammar or buy a faster
> > >> machine ;)
> > > Before I dive into TextMate grammar hacking, what do you think the
> > > likelihood is that the OCaml grammar has some kind of performance bug
> > > that can be resolved easily?
> >
> > There is no performance bugs per se in the grammar. And also, the
> > parsing is asynchronous, so it is not the parsing itself which stalls
> > TextMate.
> >
> > Likely it is resolving scope selectors, this is done both when
> > building the function pop-up and when rendering the text.
> >
> > The first there is not much to do about, the second might improve if
> > you disable all the bundles you do not use (so less bundles provide
> > styles/preferences where the scope selector needs to be compared) --
> > FYI what's actually slow here is using the system string class. I am
> > switching away from that, but not in the 1.5 branch (which is really
> > just for bug fixes).
> >
> > Could you btw let me know which machine you have?
>
> I have a 1.33 GHz PowerBook G4 with 1.25 GB of RAM.
>
> How does one disable bundles?
>
> Thanks,
> Benjamin
>
> _______________________________________________
> textmate-dev mailing list
> textmate-dev at lists.macromates.com
> http://lists.macromates.com/mailman/listinfo/textmate-dev
>



More information about the textmate-dev mailing list