unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: John Wiegley <jwiegley@gmail.com>
Cc: mituharu+bug-gnu-emacs-mac@math.s.chiba-u.ac.jp, 11545@debbugs.gnu.org
Subject: bug#11545: 24.0.96-mac-2.92; Strange speed problem scrolling in C++ code
Date: Fri, 25 May 2012 21:45:47 +0000	[thread overview]
Message-ID: <20120525214547.GA5177@acm.acm> (raw)
In-Reply-To: <m2wr439oon.fsf@gmail.com>

Hello John,

On Wed, May 23, 2012 at 05:28:24AM -0500, John Wiegley wrote:
> >>>>> Glenn Morris <rgm@gnu.org> writes:

> > I see hundreds of lines of differences between the emacs-23 and emacs-24
> > branch versions of cc-fonts.

> Sorry, tool failure here.  Now I'm seeing:

>     660 insertions(+), 243 deletions(-)

> > PS The context for this bug report is missing; but I imagine the first thing
> > Alan will ask for is an example that shows how to reproduce the problem.

> Start either Emacs with -Q -nw.  Open a largish C++ file.  Hold down C-v.  On
> my laptop the lagginess was quite obvious, on my desktop a little less so.

This has been the case for some while, as you have said.

The offending function is probably c-font-lock-enclosing-decls, a
relatively new function.  c-f-l-e-decls solves the former problem of
misfontification when a jit-lock chunk started within (mainly) a
struct/enum/union/class/... and lacked the context to fontify correctly.
An example of this happening was the first enum construct in
.../emacs/src/gnutls.h.

Could you possibly check this is the case in your file.c++ using elp.
Here's a quick recipe in case you haven't used it before:
[ M-x elp-instrument-package <ret> c- <ret>.
  Scroll with C-v, either once or an arbitrary number of times.
  M-x elp-results.]

The cost of this correct fontification is the "slight" sluggishness being
seen here.  It is likely possible to optimise this function somewhat,
though probably it's now too late for Emacs 24.1.

> Thanks, John

-- 
Alan Mackenzie (Nuremberg, Germany).





  parent reply	other threads:[~2012-05-25 21:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m2d364ocwo.fsf@gmail.com>
     [not found] ` <wlwr4bsioz.wl%mituharu@math.s.chiba-u.ac.jp>
     [not found]   ` <m2zk97qvpr.fsf@gmail.com>
     [not found]     ` <wlvcju737a.wl%mituharu@math.s.chiba-u.ac.jp>
2012-05-23  7:24       ` bug#11545: 24.0.96-mac-2.92; Strange speed problem scrolling in C++ code John Wiegley
2012-05-23  7:35         ` Andreas Schwab
2012-05-23  7:51         ` Glenn Morris
2012-05-23  8:15           ` Glenn Morris
2012-05-23 10:28             ` John Wiegley
2012-05-23 16:16               ` Eli Zaretskii
2012-05-23 22:27                 ` John Wiegley
2012-05-25 21:45               ` Alan Mackenzie [this message]
2012-05-26  7:46                 ` John Wiegley
2012-05-28 23:05         ` John Wiegley
2012-06-02 21:20           ` Alan Mackenzie
2012-06-11 13:31             ` bug#11545: " John Wiegley
2019-11-01 18:40             ` Stefan Kangas
2019-11-02 10:59               ` Alan Mackenzie
2019-11-02 11:08                 ` Stefan Kangas

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=20120525214547.GA5177@acm.acm \
    --to=acm@muc.de \
    --cc=11545@debbugs.gnu.org \
    --cc=jwiegley@gmail.com \
    --cc=mituharu+bug-gnu-emacs-mac@math.s.chiba-u.ac.jp \
    /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).