Re: When is a syntax file too big?

2006-06-19 Thread Bram Moolenaar

Peter Hodge wrote:

> I have recently taken over maintainance of the PHP syntax file which
> was rather neglected for around 2 years.  PHP is growing quite rapidly
> and unfortunately that means that by now there are well over 1700
> keywords which need to be correctly identified, and my next release of
> the syntax file is going to be over 100kb if I include all the
> built-in keywords, making it the largest syntax file distributed with
> Vim (it is already the second-largest).
> 
> So my question is: is 100kb too big for a standard syntax file? Do I
> need to break it up and include extra features as a separate package?

I don't think it is too big, but you do need to take care of speed.
Both for loading the syntax file and for redrawing.

Keywords are fast.  Best is when you put many of them in one "syn
keyword" command.

What slows down redrawing is the syncing and having many patterns.

-- 
ARTHUR:  Bloody peasant!
DENNIS:  Oh, what a give away.  Did you here that, did you here that, eh?
 That's what I'm on about -- did you see him repressing me, you saw it
 didn't you?
  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


When is a syntax file too big?

2006-06-18 Thread Peter Hodge
Hello all,

I have recently taken over maintainance of the PHP syntax file which was rather
neglected for around 2 years.  PHP is growing quite rapidly and unfortunately
that means that by now there are well over 1700 keywords which need to be
correctly identified, and my next release of the syntax file is going to be
over 100kb if I include all the built-in keywords, making it the largest syntax
file distributed with Vim (it is already the second-largest).

So my question is: is 100kb too big for a standard syntax file? Do I need to
break it up and include extra features as a separate package?

regards,
Peter




The LOST Ninja blog: Exclusive clues, clips and gossip. 
http://au.blogs.yahoo.com/lostninja