From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 Message-ID: <83ee689156.fsf@gnu.org> References: <83zgoybbfr.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24824"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52593@debbugs.gnu.org To: Kang Niu Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 19 14:27:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mywDW-0006Aa-Mq for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Dec 2021 14:27:10 +0100 Original-Received: from localhost ([::1]:35398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mywDV-0007NA-JA for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 19 Dec 2021 08:27:09 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46806) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mywDO-0007Mm-Om for bug-gnu-emacs@gnu.org; Sun, 19 Dec 2021 08:27:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33700) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mywDO-0004b6-G9 for bug-gnu-emacs@gnu.org; Sun, 19 Dec 2021 08:27:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mywDO-0001zC-9b for bug-gnu-emacs@gnu.org; Sun, 19 Dec 2021 08:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 19 Dec 2021 13:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52593 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 52593-submit@debbugs.gnu.org id=B52593.16399203897595 (code B ref 52593); Sun, 19 Dec 2021 13:27:02 +0000 Original-Received: (at 52593) by debbugs.gnu.org; 19 Dec 2021 13:26:29 +0000 Original-Received: from localhost ([127.0.0.1]:45246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mywCq-0001yQ-Vy for submit@debbugs.gnu.org; Sun, 19 Dec 2021 08:26:29 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:45966) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mywCq-0001yD-62 for 52593@debbugs.gnu.org; Sun, 19 Dec 2021 08:26:28 -0500 Original-Received: from [2001:470:142:3::e] (port=34092 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mywCk-0004SL-Ru; Sun, 19 Dec 2021 08:26:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=6Jj1phtBwhfALkK9SreQAKj/jeF+vftDIoscGvvDDOQ=; b=Cii5NMH3jOA4 KvhPQEBkE8orU63uT9ipihBC8kHp7yTjS//3rG2b1P8RPBTUh6egiN4RGc0koCiUTu3tr7kOCkfX3 ihOc/3csE09ODUgMzWqAjLkLM6jjgTSXRCDrjuxSY7gqp9P5QSUlVCicZ0LvICnfcLcBBoEDzbw9h 9CxHWixyHPEyDjpclJsBjgnRgdmHij8/KKcTzxe7NMqWXmhRhuvW3eTw5+EEOa9X6pwnH1bZ0Q43N /6FBbTsxnIdbzB7eY0y+5MJQVZgmTQe/dLFmiN7eueZeqGLdOR/RBoq81CAScIBTjyXGekUtPBFwg l+gU5k7SaJu/jF0YLKBLEQ==; Original-Received: from [87.69.77.57] (port=2414 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mywCk-0005St-Oa; Sun, 19 Dec 2021 08:26:23 -0500 In-Reply-To: (message from Kang Niu on Sun, 19 Dec 2021 21:07:24 +0800) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:222676 Archived-At: [Forwarding to the bug tracker. Please use Reply All to keep the bug tracker on the CC list.] > From: Kang Niu > 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