unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: "Björn Lindqvist" <bjourne@gmail.com>
Cc: acm@muc.de, Eli Zaretskii <eliz@gnu.org>, 74357@debbugs.gnu.org
Subject: bug#74357: c-mode: Some syntactic constructs cause unreasonable typing lag
Date: Sat, 30 Nov 2024 18:33:27 +0000	[thread overview]
Message-ID: <Z0tad1xRp0rMkTC7@MAC.fritz.box> (raw)
In-Reply-To: <CALG+76cdJ8bnXTVCVsM3GJu+BNpqeB11+yH7kT5x8xSJRqtYFA@mail.gmail.com>

Hello, Björn.

Thanks for such a prompt reply.

On Sat, Nov 30, 2024 at 19:04:31 +0100, Björn Lindqvist wrote:
> Hello Alan,

> I applied your patch (patch < patch.diff), then I byte-compiled the
> changed elisp files (emacs -batch -f batch-byte-compile cc-engine.el,
> emacs -batch -f batch-byte-compile cc-mode.el), and then I installed
> them over the existing .elc files. Maybe I applied the patch wrong
> because it didn't improve performance. You can find a new profiler
> report here:

> https://gist.github.com/bjourne/c715e15729c841d1f68e00499c622d77

Sorry it hasn't worked, yet.

I've had a look at that profiler report, and it seems clear that it's
profiling something without the patch applied.  In particular, the amount
of time taken by c-inside-bracelist-p is ~29% out of the 42% that
redisplay_internal is taking.  It will also account for a similar part
of the garbage collection, giving around 2/3 of the time spent just in
c-inside-bracelist-p.

The patch ought virtually to eliminate that 2/3 of run time taken by
that function, giving a speed increase of a factor of 3.

Might it be that your Emacs is still loading native compiled files
rather than the new .elc files?  Or something like that?

> -- 
> mvh/best regards Björn Lindqvist

-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2024-11-30 18:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-14 20:39 bug#74357: c-mode: Some syntactic constructs cause unreasonable typing lag Björn Lindqvist
2024-11-15  7:40 ` Eli Zaretskii
2024-11-15 14:08   ` Björn Lindqvist
2024-11-15 14:25     ` Eli Zaretskii
2024-11-15 14:45       ` Alan Mackenzie
2024-11-15 21:43       ` Björn Lindqvist
2024-11-16 11:00         ` Eli Zaretskii
2024-11-28 20:03         ` Alan Mackenzie
2024-11-29 23:18           ` Alan Mackenzie
2024-11-30 18:04             ` Björn Lindqvist
2024-11-30 18:33               ` Alan Mackenzie [this message]
2024-11-30 20:07                 ` Björn Lindqvist
2024-12-01 17:49                   ` Alan Mackenzie

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=Z0tad1xRp0rMkTC7@MAC.fritz.box \
    --to=acm@muc.de \
    --cc=74357@debbugs.gnu.org \
    --cc=bjourne@gmail.com \
    --cc=eliz@gnu.org \
    /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).