From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Sujith Newsgroups: gmane.emacs.bugs Subject: bug#29889: 27.0.50; Slow visual selection Date: Sun, 31 Dec 2017 10:55:32 +0530 Message-ID: <87wp13h3jn.fsf@gmail.com> References: <87y3lmgphl.fsf@gmail.com> <83tvw9gb26.fsf@gnu.org> <87efndro8q.fsf@gmail.com> <837et4fraf.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1514697863 20786 195.159.176.226 (31 Dec 2017 05:24:23 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 31 Dec 2017 05:24:23 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 27.0.50 Cc: 29889@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 31 06:24:18 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 1eVW6U-0004cr-RC for geb-bug-gnu-emacs@m.gmane.org; Sun, 31 Dec 2017 06:24:11 +0100 Original-Received: from localhost ([::1]:54535 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVW8S-00038d-JW for geb-bug-gnu-emacs@m.gmane.org; Sun, 31 Dec 2017 00:26:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVW8M-00038D-79 for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2017 00:26:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eVW8J-0001qo-2S for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2017 00:26:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49611) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eVW8I-0001ph-Up for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2017 00:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eVW8I-0006M6-HH for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2017 00:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Sujith Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 31 Dec 2017 05:26:02 +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.151469795724417 (code B ref 29889); Sun, 31 Dec 2017 05:26:02 +0000 Original-Received: (at 29889) by debbugs.gnu.org; 31 Dec 2017 05:25:57 +0000 Original-Received: from localhost ([127.0.0.1]:58292 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVW8D-0006Ll-DE for submit@debbugs.gnu.org; Sun, 31 Dec 2017 00:25:57 -0500 Original-Received: from mail-pl0-f50.google.com ([209.85.160.50]:38152) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVW8C-0006LV-9M for 29889@debbugs.gnu.org; Sun, 31 Dec 2017 00:25:56 -0500 Original-Received: by mail-pl0-f50.google.com with SMTP id s10so25235825plj.5 for <29889@debbugs.gnu.org>; Sat, 30 Dec 2017 21:25:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=+c2sq+H91VFx47gGTGJU5isDoDRgf93gZv/W//DzSwo=; b=JzConIlPzUvRCaIohgLPrAbL0KmLIxcWHpbG9d0fy60y+jmo8k8gXT23PcoGQD46ZO fn93Gx8CXNLgyQg6w7Sr59+gjlRYeWPckIJMMzoruYnNwQg5P5p9pcuVSkI4MeUmFoY5 DDDQGf2acBjiTw/sjAAGP7JXqTmSoIz8oVC++o1Dy9t0u0lujw06umY2gqdHIZCvHwv5 WX0Ztmx6W2/K8unsT8I/nAwHVw5uc8JSS/QIMIfK3rY6zWek3LQZtYMSBKS+MHskcEyB 4vyeoo0vikhyUmKFPXPSUO8Ea6md946+SD32qj/IqgsAXMkgFRzt0hJaQDaZkvDqZ5J/ 3NnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=+c2sq+H91VFx47gGTGJU5isDoDRgf93gZv/W//DzSwo=; b=eV8SQw/u94Z+3tov+eaHWSEBy2O/0XFwHJrQf9ww57YBaY7AC/BqMwHcoJqEgkFyz8 WPFIwKFeEBUrnV1eL1FlzxeR8ouNfafiPB3I8nUNA0yGYaNw65pDRDPOmduNjnBuxLmJ IUPXvLVsFO4wSpDtwjToi3PzKt8vnD3mbsV9DaxOkk1CZP3HYwX9/EQGRcIBJ69tP0dg CSd5JZSgwnW9F155MzjlObsrvMO0CcVqa7P0MfCnbxhbaGmcP2ehkz1phNKmrOA2lNcg DXY1fesloUc44eq8MJC/MvHiIrsLwSdSxmyyBBMOE0kkxcXzvBWw/KdAMCpa2mRPk9+H sUnA== X-Gm-Message-State: AKGB3mIMsm3TwFXrXNHEqKy4ipZcQHlXYpbtziv++0Fzc2CpnSN2pt3q aCIsuQN5Bfcd4jtALD6ksFJupej2 X-Google-Smtp-Source: ACJfBos7C/t0SEPJ+jLD6w2qaonf0GMrU50KnE8Fe3slPnmoK5p3TTI9dmSusiiMlm6CeAgB29Rf5w== X-Received: by 10.84.160.195 with SMTP id v3mr40645981plg.218.1514697949907; Sat, 30 Dec 2017 21:25:49 -0800 (PST) Original-Received: from the-damned ([42.111.162.161]) by smtp.gmail.com with ESMTPSA id u19sm51016284pgv.6.2017.12.30.21.25.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 30 Dec 2017 21:25:49 -0800 (PST) In-reply-to: <837et4fraf.fsf@gnu.org> 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:141638 Archived-At: Eli Zaretskii writes: > 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. I did 'perf record emacs' and then 'perf report --stdio'. Profile report (just the top few lines): # Overhead Command Shared Object Symbol # ........ ........... .......................... ................................ # 41.09% emacs emacs-27.0.50 [.] mark_object 10.90% emacs emacs-27.0.50 [.] balance_an_interval 4.23% emacs emacs-27.0.50 [.] mark_interval 3.77% emacs emacs-27.0.50 [.] Flength 3.45% emacs emacs-27.0.50 [.] sweep_strings 3.11% emacs emacs-27.0.50 [.] sweep_conses 2.94% emacs emacs-27.0.50 [.] balance_intervals_internal 2.85% emacs emacs-27.0.50 [.] sweep_intervals 1.91% emacs emacs-27.0.50 [.] traverse_intervals_noorder 1.70% emacs emacs-27.0.50 [.] mark_char_table 1.65% emacs emacs-27.0.50 [.] next_interval 1.52% emacs emacs-27.0.50 [.] copy_intervals 1.50% emacs emacs-27.0.50 [.] concat 1.43% emacs emacs-27.0.50 [.] sweep_vectors 1.28% emacs emacs-27.0.50 [.] scan_sexps_forward 0.93% emacs emacs-27.0.50 [.] Fcons 0.84% emacs emacs-27.0.50 [.] exec_byte_code 0.81% emacs emacs-27.0.50 [.] sweep_symbols 0.72% emacs emacs-27.0.50 [.] re_match_2_internal Using gprof with --enable-profiling, the report looks like: Flat profile: Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls ms/call ms/call name 33.97 6.33 6.33 111195700 0.00 0.00 mark_object 10.26 8.24 1.91 31639099 0.00 0.00 balance_an_interval 3.54 8.90 0.66 22239242 0.00 0.00 mark_interval 2.95 9.45 0.55 7431 0.07 0.25 balance_intervals_internal 2.79 9.97 0.52 223 2.33 10.50 sweep_strings 2.42 10.42 0.45 7826133 0.00 0.00 Flength 2.42 10.87 0.45 223 2.02 2.26 sweep_conses 2.09 11.26 0.39 223 1.75 1.89 sweep_intervals 2.09 11.65 0.39 419665 0.00 0.00 assq_no_quit 2.04 12.03 0.38 11148108 0.00 0.00 next_interval 1.93 12.39 0.36 42738 0.01 0.02 scan_sexps_forward 1.88 12.74 0.35 7482960 0.00 0.00 concat 1.66 13.05 0.31 24810407 0.00 0.00 FETCH_MULTIBYTE_CHAR 1.40 13.31 0.26 34595 0.01 0.01 mark_char_table 1.34 13.56 0.25 7431 0.03 0.12 traverse_intervals_noorder 1.29 13.80 0.24 422335 0.00 0.00 exec_byte_code 1.18 14.02 0.22 223 0.99 1.14 sweep_vectors 1.07 14.22 0.20 282 0.71 0.71 evxprintf