Matt Tucker <tuck(a)whistlingfish.net> writes:
If it's not the case, however, a reasonable fix might be a
buffer-local 'use-syntax-table-properties' variable which defaults
to nil, thus only enabling the extents lookups for modes which use
them.
Yes, but what about the modes that *do* or will use the local syntax
tables? Not to mention that some uses of local syntax tables could
span several modes; for example, someone might want to write a
multi-mode utility that used them.
Unacceptable performance of local syntax tables would remove much of
their utility.
Or perhaps an even better fix would be to improve the performance of
get-text-properties.
That would be a neat thing, but it might not be easy. I remember that
Ben had some hints how to do that. He might be able to help.
Failing that, could the syntax code be modified to better interact
with how XEmacs extents work? Like, is scan-lists really calling
get-text-properties that often now? Could it be modified to call
lower-level functions, and/or to cache the results of those calls?
The redisplay code already contains similar optimizations, which
include the concept of "extent runs" and "stacks of extents". The
needs of the syntax table code are probably much simpler than those of
the redisplay, but perhaps the same kind of optimizing logic is
applicable.