GNU bug report logs -
#46859
28.0.50; [PATCH]: Add option to truncate long lines in xref.el
Previous Next
Reported by: Theodor Thornhill <theo <at> thornhill.no>
Date: Mon, 1 Mar 2021 20:42:01 UTC
Severity: normal
Tags: patch
Found in version 28.0.50
Fixed in version 28.1
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
Message #95 received at 46859 <at> debbugs.gnu.org (full text, mbox):
Hi Juri,
On 03.03.2021 21:59, Juri Linkov wrote:
>> We currently don't visit the file buffer if it's not already visited,
>> parsing the line in a temp buffer instead. That approach resulted in a nice
>> perf improvement.
>
> Reusing visited files is a nice feature, but still needs a fix.
>
> Test case: visit emacs/src/xdisp.c and type
>
> C-x p g expose_frame RET
>
> See that not all lines from xdisp.c have font-lock highlighting.
> After applying this patch, all xref output lines from xdisp.c
> have font-lock faces:
I thought about this, but applying font-lock rules is not exactly a
trivial action. So I figured we better avoid it (and only call
syntax-propertize when necessary) to get the best performance possible.
Have you tried benchmarking with and without your patch? Particular case
of interest: many files, each already visited, with 1 match in each of
them. Or few matches.
The opposite would be one file with many matches inside of it. This case
should be relatively inexpensive for this patch, but it's worth
measuring to compare too.
P.S. The "(unless syntax-needed" guard in the proposed patch is not needed.
This bug report was last modified 4 years and 89 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.