GNU bug report logs - #9065
Speed up compile.el scanning

Previous Next

Package: emacs;

Reported by: Peter Dyballa <Peter_Dyballa <at> Freenet.DE>

Date: Wed, 13 Jul 2011 09:02:02 UTC

Severity: normal

Merged with 3700, 13369, 29554

Found in versions 24.0.50, 24.1, 25.3

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Peter Dyballa <Peter_Dyballa <at> Freenet.DE>
Cc: Lars Magne Ingebrigtsen <larsi <at> gnus.org>, 9065 <at> debbugs.gnu.org
Subject: bug#9065: 24.0.50; ESC-> does not seem to function
Date: Mon, 10 Oct 2011 22:10:32 -0400
retitle 9065 Speed up compile.el scanning
thanks

Yes, the scanning performed is problematic for large buffers.
There are several ways to improve the problem:
1- make the job more lazy.  E.g. split compilation--ensure-parse into 3 parts:
   a- a position independent part (that can be done one a region
      regardless of preceding text) to use in font-lock.
   b- a position-dependent part doing all the heavy lifting, used in next-error.
   c- the rest is also position-dependent but also used from font-lock,
      i.e. works just like the current compilation--ensure-parse and hence
      is the source of performance problem (so it should do as little as
      possible).
2- speed up the scanning done in syntax-propertize.

I suspect most of the time is spent regexp-matching, and this regexp
matching can be done some other way (instead of a loop over various
regexps each one matched via re-search-forward using a backtracking
matcher, we could combine them all into a single regexp matched via
a non-backtracking matcher, except for the few regexps using back-refs).

I.e. option (2) is clearly possible and could reduce the performance
problem by a very large amount.

But option (1) is also possible and highly desirable.

Patches welcome.


        Stefan




This bug report was last modified 7 years and 192 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.