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: Sun, 31 Dec 2017 09:29:53 +0200 Message-ID: <1157A54D-2179-40FB-BE74-294304A9C550@gnu.org> References: <87y3lmgphl.fsf@gmail.com> <83tvw9gb26.fsf@gnu.org> <87efndro8q.fsf@gmail.com> <837et4fraf.fsf@gnu.org> <87wp13h3jn.fsf@gmail.com> <724A6161-783D-4CAD-AFBD-40D6AEF2C6E6@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1514705358 2042 195.159.176.226 (31 Dec 2017 07:29:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 31 Dec 2017 07:29:18 +0000 (UTC) User-Agent: K-9 Mail for Android To: 29889@debbugs.gnu.org, m.sujith@gmail.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 31 08:29:14 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 1eVY3V-0000EA-MA for geb-bug-gnu-emacs@m.gmane.org; Sun, 31 Dec 2017 08:29:13 +0100 Original-Received: from localhost ([::1]:57846 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVY5R-0006LT-MO for geb-bug-gnu-emacs@m.gmane.org; Sun, 31 Dec 2017 02:31:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVY5L-0006Kz-Ae for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2017 02:31:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eVY5G-0004tX-8n for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2017 02:31:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:49660) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eVY5G-0004tI-4w for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2017 02:31:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eVY5F-0001YZ-S3 for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2017 02:31:01 -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, 31 Dec 2017 07:31: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: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org,Sujith X-Debbugs-Original-Cc: 29889@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15147054125904 (code B ref -1); Sun, 31 Dec 2017 07:31:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 31 Dec 2017 07:30:12 +0000 Original-Received: from localhost ([127.0.0.1]:58339 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVY4S-0001X5-H1 for submit@debbugs.gnu.org; Sun, 31 Dec 2017 02:30:12 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:37249) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eVY4R-0001WN-57 for submit@debbugs.gnu.org; Sun, 31 Dec 2017 02:30:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eVY4K-0002pj-Nm for submit@debbugs.gnu.org; Sun, 31 Dec 2017 02:30:05 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:46604) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eVY4K-0002pZ-KN for submit@debbugs.gnu.org; Sun, 31 Dec 2017 02:30:04 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56447) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVY4J-00067F-Ab for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2017 02:30:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eVY4E-0002cI-9X for bug-gnu-emacs@gnu.org; Sun, 31 Dec 2017 02:30:03 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:48312) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eVY4E-0002cC-5O; Sun, 31 Dec 2017 02:29:58 -0500 Original-Received: from [176.12.216.1] (port=63875 helo=[10.160.141.254]) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eVY4D-0002Ag-Dh; Sun, 31 Dec 2017 02:29:57 -0500 In-Reply-To: <724A6161-783D-4CAD-AFBD-40D6AEF2C6E6@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x 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:141640 Archived-At: On December 31, 2017 9:20:19 AM GMT+02:00, Eli Zaretskii w= rote: > On December 31, 2017 7:25:32 AM GMT+02:00, Sujith > wrote: > > 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?=20 > > That > > > should tell whether my hypothesis above holds any water, and if > not, > > > point out some other suspects=2E > >=20 > > I did 'perf record emacs' and then 'perf report --stdio'=2E > >=20 > > Profile report (just the top few lines): > >=20 > > # Overhead Command Shared Object Symbol =20 > =20 > > =20 > > # =2E=2E=2E=2E=2E=2E=2E=2E =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E =2E=2E= =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=20 > > =2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E=2E= =2E=2E=2E=2E=2E=2E=2E=2E=2E > > # > > 41=2E09% emacs emacs-27=2E0=2E50 [=2E] mark_= object > > 10=2E90% emacs emacs-27=2E0=2E50 [=2E] > > balance_an_interval > > 4=2E23% emacs emacs-27=2E0=2E50 [=2E] > mark_interval > > 3=2E77% emacs emacs-27=2E0=2E50 [=2E] Fleng= th > > 3=2E45% emacs emacs-27=2E0=2E50 [=2E] > sweep_strings > > 3=2E11% emacs emacs-27=2E0=2E50 [=2E] > sweep_conses > > 2=2E94% emacs emacs-27=2E0=2E50 [=2E] > > balance_intervals_internal > > 2=2E85% emacs emacs-27=2E0=2E50 [=2E] > sweep_intervals > > 1=2E91% emacs emacs-27=2E0=2E50 [=2E] > > traverse_intervals_noorder > > 1=2E70% emacs emacs-27=2E0=2E50 [=2E] > mark_char_table > > 1=2E65% emacs emacs-27=2E0=2E50 [=2E] > next_interval > > 1=2E52% emacs emacs-27=2E0=2E50 [=2E] > copy_intervals > > 1=2E50% emacs emacs-27=2E0=2E50 [=2E] conca= t > > 1=2E43% emacs emacs-27=2E0=2E50 [=2E] > sweep_vectors > > 1=2E28% emacs emacs-27=2E0=2E50 [=2E] > scan_sexps_forward > > 0=2E93% emacs emacs-27=2E0=2E50 [=2E] Fcons > > 0=2E84% emacs emacs-27=2E0=2E50 [=2E] > exec_byte_code > > 0=2E81% emacs emacs-27=2E0=2E50 [=2E] > sweep_symbols > > 0=2E72% emacs emacs-27=2E0=2E50 [=2E] > > re_match_2_internal > >=20 > >=20 > > Using gprof with --enable-profiling, the report looks like: > >=20 > > Flat profile: > >=20 > > Each sample counts as 0=2E01 seconds=2E > > % cumulative self self total =20 > > time seconds seconds calls ms/call ms/call name =20 > > 33=2E97 6=2E33 6=2E33 111195700 0=2E00 0=2E00 mark_= object > > 10=2E26 8=2E24 1=2E91 31639099 0=2E00 0=2E00=20 > > balance_an_interval > > 3=2E54 8=2E90 0=2E66 22239242 0=2E00 0=2E00 mark_i= nterval > > 2=2E95 9=2E45 0=2E55 7431 0=2E07 0=2E25=20 > > balance_intervals_internal > > 2=2E79 9=2E97 0=2E52 223 2=2E33 10=2E50 sweep_= strings > > 2=2E42 10=2E42 0=2E45 7826133 0=2E00 0=2E00 Flengt= h > > 2=2E42 10=2E87 0=2E45 223 2=2E02 2=2E26 sweep_= conses > > 2=2E09 11=2E26 0=2E39 223 1=2E75 1=2E89=20 > sweep_intervals > > 2=2E09 11=2E65 0=2E39 419665 0=2E00 0=2E00 assq_n= o_quit > > 2=2E04 12=2E03 0=2E38 11148108 0=2E00 0=2E00 next_i= nterval > > 1=2E93 12=2E39 0=2E36 42738 0=2E01 0=2E02=20 > scan_sexps_forward > > 1=2E88 12=2E74 0=2E35 7482960 0=2E00 0=2E00 concat > > 1=2E66 13=2E05 0=2E31 24810407 0=2E00 0=2E00=20 > > FETCH_MULTIBYTE_CHAR > > 1=2E40 13=2E31 0=2E26 34595 0=2E01 0=2E01=20 > mark_char_table > > 1=2E34 13=2E56 0=2E25 7431 0=2E03 0=2E12=20 > > traverse_intervals_noorder > > 1=2E29 13=2E80 0=2E24 422335 0=2E00 0=2E00 exec_b= yte_code > > 1=2E18 14=2E02 0=2E22 223 0=2E99 1=2E14 sweep_= vectors > > 1=2E07 14=2E22 0=2E20 282 0=2E71 0=2E71 evxpri= ntf >=20 > Thanks a lot! >=20 > Since mark_object appears high in the profile, could you please > rerun the experiment after setting gc-cons-threshold and > gc-cons-percentage so as to avoid GC for the time of the expdriment? Also, please profile only when you move the cursor in the last step of the recipe=2E I suspect that you profiled also the time during fontification of the buffer in step 1, otherwise I don't understand why balance_an_interval is called so many times=2E