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
View this message in rfc822 format
On 06.03.2021 14:54, Gregory Heytings wrote:
>> Also: grepping for that kind of regexp is noticeably slower than
>> grepping for 'file'. Or even '.file'. Like 85ms vs 7ms slower.
>>
>
> Well, the bug report mentioned delays of 3-4 seconds on files with very
> long lines, so I'd guess that 85 ms is a pretty reasonable speed...
We do want fast searches to remain fast, too.
I got that 85ms timing when searching just one file. A project can often
contain thousands of files.
In my further testing, the difference is not as stark because of other
Elisp overhead on file listing, serialization/deserialization/process
calls/parsing output, but even with all that in my work project the
difference between such searches can be 0.27s vs 0.43s.
With further optimizations of project file listing logic, the difference
can become even more pronounced (project-files in the same project takes
0.14s).
You can benchmark it yourself with this form:
(benchmark 1 '(project-find-regexp ".\\{0,100\\}file.\\{0,100\\}"))
vs
(benchmark 1 '(project-find-regexp "file"))
(I get 9s vs 7s in the same project for this particular search).
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.