all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Mattias Engdegård" <mattiase@acm.org>
To: Olivier Scalbert <olivier.scalbert@algosyn.com>
Cc: Alan Mackenzie <acm@muc.de>, 42490@debbugs.gnu.org
Subject: bug#42490: Emacs is very slow when navigating into a specific C++ file
Date: Fri, 24 Jul 2020 18:46:45 +0200	[thread overview]
Message-ID: <8E02A060-9CF0-4B1F-A780-4F51336291FA@acm.org> (raw)
In-Reply-To: <11f564eb-74f1-980b-53e3-2de64abe62e0@algosyn.com>

Hello Olivier,

Thanks for the report! Could you try Emacs 27 (or git master), building from source if necessary? Those versions should be slightly faster, although the response time is probably well below acceptable.

If we distill the essentials of your file to some sort of benchmark, we might end up with:

(with-temp-buffer
  (c++-mode)
  (dotimes (_ 1000)
    (insert "OP(ed,b0) { ldir(); } /* LDIR */\n"))
  (garbage-collect)
  (let ((t0 (current-time)))
    (font-lock-ensure (point-min) (point-max))
    (time-to-seconds (time-since t0))))

Emacs 26.3 runs it in 11.9 s on this old lappy, but Emacs 27 does it in 3.3 s. This is a clear improvement but we should be able to do better. Alan may have a feeling for where the cycles are spent.






  reply	other threads:[~2020-07-24 16:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-23  7:45 bug#42490: Emacs is very slow when navigating into a specific C++ file Olivier Scalbert
2020-07-24 16:46 ` Mattias Engdegård [this message]
2020-07-24 19:24   ` Alan Mackenzie
2020-07-24 19:34     ` Olivier Scalbert
2020-09-21  9:06       ` Alan Mackenzie
2020-09-21 17:29         ` Olivier Scalbert
2020-09-22 10:03           ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8E02A060-9CF0-4B1F-A780-4F51336291FA@acm.org \
    --to=mattiase@acm.org \
    --cc=42490@debbugs.gnu.org \
    --cc=acm@muc.de \
    --cc=olivier.scalbert@algosyn.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.