From: Eli Zaretskii <eliz@gnu.org>
To: 29889@debbugs.gnu.org, m.sujith@gmail.com
Subject: bug#29889: 27.0.50; Slow visual selection
Date: Sun, 31 Dec 2017 09:29:53 +0200 [thread overview]
Message-ID: <1157A54D-2179-40FB-BE74-294304A9C550@gnu.org> (raw)
In-Reply-To: <724A6161-783D-4CAD-AFBD-40D6AEF2C6E6@gnu.org>
On December 31, 2017 9:20:19 AM GMT+02:00, Eli Zaretskii <eliz@gnu.org> wrote:
> On December 31, 2017 7:25:32 AM GMT+02:00, Sujith <m.sujith@gmail.com>
> wrote:
> > Eli Zaretskii <eliz@gnu.org> 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
>
> Thanks a lot!
>
> 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. 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.
next prev parent reply other threads:[~2017-12-31 7:29 UTC|newest]
Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-29 3:52 bug#29889: 27.0.50; Slow visual selection Sujith
2017-12-29 9:04 ` Eli Zaretskii
2017-12-30 1:36 ` Sujith
2017-12-30 10:23 ` Eli Zaretskii
2017-12-31 5:25 ` Sujith
2017-12-31 7:20 ` Eli Zaretskii
2017-12-31 7:29 ` Eli Zaretskii [this message]
2018-01-06 1:15 ` Sujith
2018-01-06 8:37 ` Eli Zaretskii
2018-01-06 15:37 ` Stefan Monnier
2018-01-06 16:16 ` Eli Zaretskii
2018-01-07 15:24 ` bug#29889: [SUSPECTED SPAM] " Stefan Monnier
2018-01-07 16:08 ` martin rudalics
2018-01-07 17:36 ` Eli Zaretskii
2018-01-07 17:54 ` Stefan Monnier
2018-01-06 15:46 ` Sujith
2017-12-31 8:42 ` Sujith
2017-12-31 15:37 ` Eli Zaretskii
2017-12-31 18:43 ` Eli Zaretskii
2022-04-21 13:25 ` Lars Ingebrigtsen
2022-05-20 2:13 ` Lars Ingebrigtsen
2022-05-20 7:16 ` Eli Zaretskii
2022-05-20 9:07 ` Lars Ingebrigtsen
2022-05-20 8:35 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-20 8:39 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-20 11:02 ` Eli Zaretskii
2022-05-20 9:03 ` Lars Ingebrigtsen
2022-05-20 9:23 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-20 10:11 ` Lars Ingebrigtsen
2022-05-20 11:13 ` Eli Zaretskii
2022-05-20 11:32 ` Lars Ingebrigtsen
2022-05-20 11:47 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-20 12:13 ` Eli Zaretskii
2022-05-20 12:16 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-20 12:21 ` Eli Zaretskii
2022-05-20 12:47 ` Lars Ingebrigtsen
2022-05-20 13:19 ` Eli Zaretskii
2022-05-21 12:16 ` Lars Ingebrigtsen
2022-05-21 12:24 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-21 13:29 ` Lars Ingebrigtsen
2022-05-22 1:13 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-22 11:16 ` Lars Ingebrigtsen
2022-05-22 12:07 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-22 12:11 ` Lars Ingebrigtsen
2022-05-22 12:30 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-23 7:50 ` Lars Ingebrigtsen
2022-05-23 9:04 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-23 9:11 ` Lars Ingebrigtsen
2022-05-23 9:56 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-20 11:45 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-20 11:52 ` Lars Ingebrigtsen
2022-05-20 11:08 ` Eli Zaretskii
2022-05-20 11:51 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-20 12:19 ` Eli Zaretskii
2022-05-20 12:39 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-20 13:18 ` Eli Zaretskii
2022-05-20 13:27 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-20 11:03 ` Eli Zaretskii
2022-05-20 11:49 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-20 12:16 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1157A54D-2179-40FB-BE74-294304A9C550@gnu.org \
--to=eliz@gnu.org \
--cc=29889@debbugs.gnu.org \
--cc=m.sujith@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).