|
From: | Dmitry Gutov |
Subject: | bug#46859: 28.0.50; [PATCH]: Add option to truncate long lines in xref.el |
Date: | Sat, 6 Mar 2021 14:37:26 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 06.03.2021 14:31, Dmitry Gutov wrote:
Otherwise it would be possible to use this approach (by introducing a Grep-specific location type) and avoid parsing the line contents for every match.
Except, um, we still need to fill in the "summary" attribute for all matches, so that there is something to display in the Xref buffer (the line contents around the match), and the -o flag strips those.
And if we were to use the '.{0,100}file.{0,100}' trick, it messes up the location of the match, the reported byte offset become unreliable. Also: grepping for that kind of regexp is noticeably slower than grepping for 'file'. Or even '.file'. Like 85ms vs 7ms slower.
[Prev in Thread] | Current Thread | [Next in Thread] |