bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#52593: 28.0.90; (thing-at-point thing) has so much overhead since co


From: Eli Zaretskii
Subject: bug#52593: 28.0.90; (thing-at-point thing) has so much overhead since commit 7db376e560448e61485ba054def8c82b21f33d6a
Date: Sun, 19 Dec 2021 15:26:13 +0200

[Forwarding to the bug tracker.  Please use Reply All to keep the bug
tracker on the CC list.]

> From: Kang Niu <isgniuk@gmail.com>
> Date: Sun, 19 Dec 2021 21:07:24 +0800
> 
> Thanks for your reply. I'v added two lines of code at the beginning of 
> narrow-to-region and made a test.
> 
> 2681   EMACS_INT s = fix_position (start), e = fix_position (end);
> 2682   if (BEGV == s && ZV == e)
> 2683     return Qnil;
> 
> The overhead was still there with little improvement.

That is very strange, since the code is almost a no-op.

Does field-beginning and field-end indeed return BOB and EOB in that
case?  Maybe field-beginning and field-end take this time?

> The overhead disappears only if I comment out (narrow-to-region 
> (field-beginning) (field-end)) in
> thing-at-point.

Perhaps thing-at-point should acquire a new optional argument saying
"don't pay attention to fields"?

> It is unnoticed but with some modes that call thing-at-point in 
> post-command-hook, it's unbearable.
> 
> OS:
> ArchLinux with gcc-11.1.0
> &
> Ubuntu16.04 with gcc-9
> 
> configuration:
> ./configuration 'CFLAGS=-O2 -pipe' --prefix=/usr --libdir=/usr/lib 
> --sysconfdir=/etc --libexecdir=/usr/lib
> --localstatedir=/var --without-x --with-x-toolkit=no --without-xwidgets 
> --without-toolkit\
> -scroll-bars --without-dbus --without-gsettings --without-gconf --without-xim 
> --without-xpm --without-jpeg
> --without-tiff --without-gif --without-png --without-rsvg --without-imagem\
> agick --without-lcms2 --without-libsystemd --without-selinux --without-xaw3d 
> --without-gpm --with-sound=no
> --without-xft --without-libotf --without-cairo --without-harfbuzz --withou\
> t-m17n-flt --with-modules --without-compress-install





reply via email to

[Prev in Thread] Current Thread [Next in Thread]