From: jan via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 48871@debbugs.gnu.org
Subject: bug#48871: 27.2; Unusably slow in C# mode
Date: Sun, 6 Jun 2021 13:32:09 +0100 [thread overview]
Message-ID: <CADJx9LdiZizXw4+Nxo7Zr8gWHFPUzA39-iMMB=uJ7cwpXax67g@mail.gmail.com> (raw)
Hi,
I use emacs, I'm not an expert.
C# mode is slow beyond to the point of being completely unusable. This
seems to have started when I upgraded from emacs 26 to emacs 27.2. The
file is ~220K. At the start of the file, typing takes 3 or 4 secs *per
character* to appear (at the end of the file, instantaneous). It's
forcing me to use visual studio to do all simple text editing and I
don't like that.
If I turn off font lock mode it doesn't improve any.
If I switch to fundamental mode it's back to it's snappy self.
Turning off Syntactic Indentation and Electric Mode didn't help.
I tried removing all comments to see what happened but no luck.
I did find this quite recent issue
<https://github.com/emacs-csharp/csharp-mode/issues/200> but their
solution <https://github.com/emacs-csharp/csharp-mode/issues/200#issuecomment-739926801>
didn't help because I couldn't find that text in the specified lisp
file so couldn't comment it out.
I looked on the emacs bug list but found nothing matching (not sure I
was doing the search right though).
I can provide the c# file but I'd prefer it to not be made public if possible.
Turns out emacs has a profiler, thought I'd try it. From
<https://www.gnu.org/software/emacs/manual
/html_node/elisp/Profiling.html> did profiler-start, typed some chars
(probably 20 to 30 secs locked up before it was finished, immediately
did profiler-stop, report is this (heavier parts expanded)
- command-execute 1121 97%
- call-interactively 1121 97%
- funcall-interactively 1114 96%
- self-insert-command 889 77%
- c-before-change 878 76%
- mapc 878 76%
- #<compiled 0x2297aaf> 878 76%
- c-before-change-check-unbalanced-strings 877 76%
c-pps-to-string-delim 865 75%
- c-syntactic-re-search-forward 11 0%
c-beginning-of-macro 4 0%
- c-after-change 11 0%
- mapc 11 0%
- #<compiled 0x2297b19> 11 0%
c-after-change-mark-abnormal-strings 4 0%
- c-restore-<>-properties 4 0%
c-syntactic-re-search-forward 3 0%
- c-forward-<>-arglist 1 0%
- c-forward-<>-arglist-recur 1 0%
c-forward-sws 1 0%
- c-change-expand-fl-region 2 0%
- c-fl-decl-end 2 0%
- c-literal-start 2 0%
- c-semi-pp-to-literal 2 0%
c-parse-ps-state-below 2 0%
c-parse-quotes-after-change 1 0%
- newline 223 19%
- self-insert-command 223 19%
- electric-indent-post-self-insert-function 112 9%
- indent-according-to-mode 112 9%
- c-indent-line 112 9%
- c-shift-line-indentation 112 9%
- c-before-change 110 9%
+ mapc 109 9%
c-restore-string-fences 1 0%
- c-after-change 2 0%
- mapc 2 0%
- #<compiled 0x2297b19> 2 0%
c-after-change-mark-abnormal-strings 1 0%
- c-restore-<>-properties 1 0%
c-syntactic-re-search-forward 1 0%
- c-before-change 110 9%
- mapc 110 9%
- #<compiled 0x2297aaf> 110 9%
- c-before-change-check-unbalanced-strings 110 9%
c-pps-to-string-delim 109 9%
c-syntactic-re-search-forward 1 0%
- c-after-change 1 0%
- mapc 1 0%
- #<compiled 0x2297b19> 1 0%
- c-restore-<>-properties 1 0%
c-syntactic-re-search-forward 1 0%
- execute-extended-command 2 0%
- sit-for 2 0%
redisplay 2 0%
+ byte-code 7 0%
- ... 25 2%
Automatic GC 25 2%
+ redisplay_internal (C function) 5 0%
Not sure what to do.
cheers
jan
next reply other threads:[~2021-06-06 12:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-06 12:32 jan via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-06-06 12:49 ` bug#48871: 27.2; Unusably slow in C# mode Eli Zaretskii
2021-06-06 13:34 ` jan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-06 13:50 ` Eli Zaretskii
2021-06-06 14:53 ` jan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-06 17:00 ` Eli Zaretskii
2021-06-06 18:00 ` jan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-06 18:08 ` Eli Zaretskii
2021-06-06 18:22 ` jan via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-06-06 19:27 ` Alan Mackenzie
2021-06-09 11:06 ` jan via Bug reports for GNU Emacs, the Swiss army knife of text editors
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='CADJx9LdiZizXw4+Nxo7Zr8gWHFPUzA39-iMMB=uJ7cwpXax67g@mail.gmail.com' \
--to=bug-gnu-emacs@gnu.org \
--cc=48871@debbugs.gnu.org \
--cc=rtm443x@googlemail.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).