unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Björn Lindqvist" <bjourne@gmail.com>
To: Alan Mackenzie <acm@muc.de>
Cc: 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 21:07:06 +0100	[thread overview]
Message-ID: <CALG+76cRrQw6nd4MZGfiROm_CRmQojTvTk6pN5ZA5PNrFXKyjQ@mail.gmail.com> (raw)
In-Reply-To: <Z0tad1xRp0rMkTC7@MAC.fritz.box>

Hello Alan,

Now I rebuilt emacs from scratch with patches. Though there is still
some lag, on my degenerate test case there is a substantial
improvement! I can't try the patches on my slow computer since
building emacs on it takes too long. But I'll try it on the next emacs
release.

Den lör 30 nov. 2024 kl 19:33 skrev Alan Mackenzie <acm@muc.de>:
>
> 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).



-- 
mvh/best regards Björn Lindqvist





      reply	other threads:[~2024-11-30 20:07 UTC|newest]

Thread overview: 12+ 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
2024-11-30 20:07                 ` Björn Lindqvist [this message]

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=CALG+76cRrQw6nd4MZGfiROm_CRmQojTvTk6pN5ZA5PNrFXKyjQ@mail.gmail.com \
    --to=bjourne@gmail.com \
    --cc=74357@debbugs.gnu.org \
    --cc=acm@muc.de \
    --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).