GNU bug report logs -
#54608
29.0.50; xref-search-program-alist: support ugrep
Previous Next
Reported by: Manuel Uberti <manuel.uberti <at> inventati.org>
Date: Mon, 28 Mar 2022 12:30:02 UTC
Severity: normal
Tags: patch
Found in version 29.0.50
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 54608 in the body.
You can then email your comments to 54608 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54608
; Package
emacs
.
(Mon, 28 Mar 2022 12:30:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Manuel Uberti <manuel.uberti <at> inventati.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 28 Mar 2022 12:30:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
I attached a small patch to extend xref-search-program-alist and
xref-xref-search-program with support for ugrep[1].
Is it something that can be of any interest?
[1] https://github.com/Genivia/ugrep
In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version
1.16.0, Xaw3d scroll bars)
of 2022-03-28 built on hathaway
Repository revision: 0e7314f6f15a20cb2ae712c09bb201f571823a6f
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12013000
System Description: Ubuntu 20.04 LTS
Configured using:
'configure --with-harfbuzz --with-native-compilation'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES
NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND THREADS TIFF
TOOLKIT_SCROLL_BARS X11 XAW3D XDBE XIM XPM LUCID ZLIB
Important settings:
value of $LC_MONETARY: it_IT.UTF-8
value of $LC_NUMERIC: it_IT.UTF-8
value of $LC_TIME: it_IT.UTF-8
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: Shell
Minor modes in effect:
goto-address-mode: t
shell-dirtrack-mode: t
pixel-scroll-precision-mode: t
windmove-mode: t
delete-selection-mode: t
minibuffer-electric-default-mode: t
savehist-mode: t
global-so-long-mode: t
global-subword-mode: t
subword-mode: t
winner-mode: t
global-company-mode: t
company-mode: t
minibuffer-depth-indicate-mode: t
vertico-mode: t
tooltip-mode: t
global-eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
window-divider-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug dabbrev goto-addr pcmpl-args pcmpl-linux
pcmpl-unix shell pcomplete smerge-mode diff whitespace bug-reference
log-edit message sendmail yank-media rmc puny dired-x dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 mm-util ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils
mailheader pcvs-util add-log vc-dir ewoc server misearch multi-isearch
time-date noutline outline checkdoc lisp-mnt elec-pair flymake-proc
flymake pp buffer-env vc-git diff-mode easy-mmode vc vc-dispatcher grep
compile text-property-search comint ansi-color thingatpt
vertico-directory cursor-sensor modus-operandi-theme modus-themes
pixel-scroll windmove delight comp comp-cstr warnings cl-extra help-mode
delsel minibuf-eldef savehist so-long cap-words superword subword winner
company-oddmuse company-keywords company-etags etags fileloop generator
xref project ring company-gtags company-dabbrev-code company-dabbrev
company-files company-clang company-capf company-cmake company-semantic
company-template company-bbdb company pcase mb-depth vertico ibuf-macs
rx info tex-site package browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-domsuf url-util mailcap
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map url-vars seq gv subr-x byte-opt
bytecomp byte-compile cconv cl-loaddefs cl-lib iso-transl tooltip eldoc
paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode
mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode
prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mouse jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer nadvice simple cl-generic cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop
case-table epa-hook jka-cmpr-hook help abbrev obarray cl-preloaded
button loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo x-toolkit
x multi-tty make-network-process native-compile emacs)
Memory information:
((conses 16 295405 65421)
(symbols 48 17422 1)
(strings 32 62953 4379)
(string-bytes 1 2031804)
(vectors 16 33099)
(vector-slots 8 928479 37143)
(floats 8 203 609)
(intervals 56 3658 1060)
(buffers 992 31))
--
Manuel Uberti
www.manueluberti.eu
[0001-Support-ugrep-in-xref-search-program-alist.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54608
; Package
emacs
.
(Mon, 28 Mar 2022 12:58:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 54608 <at> debbugs.gnu.org (full text, mbox):
Hi!
On 28.03.2022 15:29, Manuel Uberti via Bug reports for GNU Emacs, the
Swiss army knife of text editors wrote:
>
> I attached a small patch to extend xref-search-program-alist and
> xref-xref-search-program with support for ugrep[1].
>
> Is it something that can be of any interest?
Sure.
Does ugrep show better performance in this use case than grep on your
machine?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54608
; Package
emacs
.
(Mon, 28 Mar 2022 15:03:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 54608 <at> debbugs.gnu.org (full text, mbox):
On 28.03.2022 17:37, Manuel Uberti wrote:
> On 28/03/22 14:57, Dmitry Gutov wrote:
>> Does ugrep show better performance in this use case than grep on your
>> machine?
>
> With ugrep running `M-: (benchmark 100 (project-find-regexp
> "setq-default"))` in the directory containg Emacs source code returns:
>
> Elapsed time: 0.003903s
>
> With regular grep I get:
>
> Elapsed time: 0.026032s (0.022015s in 1 GCs)
0.026032s (0.022015s in 1 GCs) implies the total runtime sans GC
takes 0.026 - 0.022 = 0.004, which is pretty much the same as what you
measured for ugrep (0.0039). The the choice of search program is
unlikely to affect the GC time. It probably occurred randomly.
You might want to try doing a search in a larger project, for a
relatively unique string (which has less than 100 matches, say). Then
you can see the effect of search program's performance.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54608
; Package
emacs
.
(Mon, 28 Mar 2022 15:45:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 54608 <at> debbugs.gnu.org (full text, mbox):
On 28/03/22 17:02, Dmitry Gutov wrote:
> You might want to try doing a search in a larger project, for a relatively
unique string (which has less than 100 matches, say). Then you can see the
effect of search program's performance.
I tried `(benchmark-run (project-find-regexp "torvalds"))` in the Linux kernel code.
With grep: (3.628388951 6 0.3137041489999959)
With ugrep: (2.664314312 6 0.31696058299999663)
--
Manuel Uberti
www.manueluberti.eu
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54608
; Package
emacs
.
(Mon, 28 Mar 2022 16:01:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 54608 <at> debbugs.gnu.org (full text, mbox):
On 28.03.2022 18:43, Manuel Uberti via Bug reports for GNU Emacs, the
Swiss army knife of text editors wrote:
> I tried `(benchmark-run (project-find-regexp "torvalds"))` in the Linux
> kernel code.
>
> With grep: (3.628388951 6 0.3137041489999959)
> With ugrep: (2.664314312 6 0.31696058299999663)
This is pretty good.
Did you run them a bunch of times? All subsequent searches after the
first one are usually faster because of "warm" filesystem cache.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54608
; Package
emacs
.
(Mon, 28 Mar 2022 16:06:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 54608 <at> debbugs.gnu.org (full text, mbox):
On 28/03/22 18:00, Dmitry Gutov wrote:
> This is pretty good.
>
> Did you run them a bunch of times? All subsequent searches after the first one
> are usually faster because of "warm" filesystem cache.
This what I get:
3 subsequent tries with grep:
(3.607880503 6 0.34762815199999864)
(3.686721065 6 0.34971310299999914)
(3.6002628420000002 6 0.33050382999999783)
3 subsequent tries with ugrep:
(2.838539952 6 0.33570421699999997)
(3.002044363 6 0.3332255390000043)
(2.750283601 6 0.33057494999999903)
--
Manuel Uberti
www.manueluberti.eu
Added tag(s) patch.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 29 Mar 2022 13:01:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54608
; Package
emacs
.
(Thu, 31 Mar 2022 08:59:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 54608 <at> debbugs.gnu.org (full text, mbox):
Hi Dmitry,
is there something more you need me to do on this?
Thanks
--
Manuel Uberti
www.manueluberti.eu
Reply sent
to
Dmitry Gutov <dgutov <at> yandex.ru>
:
You have taken responsibility.
(Sat, 02 Apr 2022 01:36:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Manuel Uberti <manuel.uberti <at> inventati.org>
:
bug acknowledged by developer.
(Sat, 02 Apr 2022 01:36:02 GMT)
Full text and
rfc822 format available.
Message #30 received at 54608-done <at> debbugs.gnu.org (full text, mbox):
Hi Manuel,
On 31.03.2022 11:58, Manuel Uberti via Bug reports for GNU Emacs, the
Swiss army knife of text editors wrote:
> Hi Dmitry,
>
> is there something more you need me to do on this?
Both code and testing look good, thanks.
I've pushed the change in 9468ab2570.
Please take a look at the commit message, though. It would be helpful if
your patches use the required format right away.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#54608
; Package
emacs
.
(Sat, 02 Apr 2022 06:54:02 GMT)
Full text and
rfc822 format available.
Message #33 received at 54608-done <at> debbugs.gnu.org (full text, mbox):
On 02/04/22 03:35, Dmitry Gutov wrote:
> Both code and testing look good, thanks.
>
> I've pushed the change in 9468ab2570.
Thanks, and sorry about the typo that you had to fix.
> Please take a look at the commit message, though. It would be helpful if your
> patches use the required format right away.
Thanks for the tip, I will do. I thought I had done it this time but I see now
that I missed something.
--
Manuel Uberti
www.manueluberti.eu
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 30 Apr 2022 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 111 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.