From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#29889: 27.0.50; Slow visual selection Date: Sat, 30 Dec 2017 12:23:20 +0200 Message-ID: <837et4fraf.fsf@gnu.org> References: <87y3lmgphl.fsf@gmail.com> <83tvw9gb26.fsf@gnu.org> <87efndro8q.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1514629345 6427 195.159.176.226 (30 Dec 2017 10:22:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 30 Dec 2017 10:22:25 +0000 (UTC) Cc: 29889@debbugs.gnu.org To: Sujith Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 30 11:22:21 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVEHM-0000xP-W0 for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Dec 2017 11:22:13 +0100 Original-Received: from localhost ([::1]:49192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVEJK-0000pW-5f for geb-bug-gnu-emacs@m.gmane.org; Sat, 30 Dec 2017 05:24:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54200) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVEJE-0000nR-0b for bug-gnu-emacs@gnu.org; Sat, 30 Dec 2017 05:24:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eVEJ8-0002m2-Tx for bug-gnu-emacs@gnu.org; Sat, 30 Dec 2017 05:24:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:48524) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eVEJ8-0002lY-Qg for bug-gnu-emacs@gnu.org; Sat, 30 Dec 2017 05:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eVEJ7-0004sF-MF for bug-gnu-emacs@gnu.org; Sat, 30 Dec 2017 05:24: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: Sat, 30 Dec 2017 10:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29889 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29889-submit@debbugs.gnu.org id=B29889.151462942718709 (code B ref 29889); Sat, 30 Dec 2017 10:24:01 +0000 Original-Received: (at 29889) by debbugs.gnu.org; 30 Dec 2017 10:23:47 +0000 Original-Received: from localhost ([127.0.0.1]:57205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVEIt-0004rh-AD for submit@debbugs.gnu.org; Sat, 30 Dec 2017 05:23:47 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVEIr-0004rR-AG for 29889@debbugs.gnu.org; Sat, 30 Dec 2017 05:23:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eVEIh-0002JY-7p for 29889@debbugs.gnu.org; Sat, 30 Dec 2017 05:23:40 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39797) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVEIh-0002JN-45; Sat, 30 Dec 2017 05:23:35 -0500 Original-Received: from [176.228.60.248] (port=4658 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eVEIg-0008QL-KH; Sat, 30 Dec 2017 05:23:34 -0500 In-reply-to: <87efndro8q.fsf@gmail.com> (message from Sujith on Sat, 30 Dec 2017 07:06:05 +0530) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:141609 Archived-At: > From: Sujith > Cc: 29889@debbugs.gnu.org > Date: Sat, 30 Dec 2017 07:06:05 +0530 > > Eli Zaretskii writes: > > Confirmed. Additional info: > > > > This happens also on the emacs-26 branch and in the 26.0.90 pretest, > > but not in Emacs 25.2. > > I checked out the 'emacs-25.2' tag and the issue happens there also. You are right. It turns out the issue all but disappears in an optimized build; once I rebuilt Emacs 25.3 without optimizations, I see this in that version as well. However, I don't seem to be able to see the problem in a -nw session, or maybe the slowness in non-GUI frames is just below the threshold of keeping up with the keyboard auto-repeat rate. Starting with Emacs 25.1, we switched to using an overlay for showing the region, so the prime suspect at this point is the relatively expensive redisplay when buffer overlays have changed since the previous redisplay, especially in a buffer with many text properties (produced by font-locking). E.g., I see that with region highlighted, every C-f causes a full redisplay of the window, because all the other redisplay optimizations are disabled. > To get a valid starting point which could be seen as a 'good' commit > for git-bisect, I tried to go back in the tree. I went up to Jun-1-2016 > and then I ran into build errors. But the issue was present at that > point too. This sounds consistent with the hypothesis that the overlay-based implementation of region highlighting is the trigger. > Anything else which I could do to help ? Run Emacs under 'perf' (or build with C-level profiling), and show the C-level profile while moving the cursor with region highlighted? That should tell whether my hypothesis above holds any water, and if not, point out some other suspects. Thanks.