[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9065: 24.0.50; ESC-> does not seem to function
From: |
Stefan Monnier |
Subject: |
bug#9065: 24.0.50; ESC-> does not seem to function |
Date: |
Mon, 10 Oct 2011 22:10:32 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.90 (gnu/linux) |
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