From: Alan Mackenzie <acm@muc.de>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: emacs-devel@gnu.org
Subject: Processing speed in large C++ raw strings.
Date: Thu, 25 Apr 2019 18:36:15 +0000 [thread overview]
Message-ID: <20190425183615.GB19807@ACM> (raw)
Hello, Dmitry.
Some while ago, you were complaining, justifiably, about the
sluggishness when typing characters into very long C++ raw strings. To
demonstrate this, you put xdisp.c into C++ mode, and put a raw string
round nearly the entire buffer.
Last week, it was taking over 2 seconds to process a single
self-insert-command into this string, and my machine is not slow.
I have now optimized CC Mode, such that each such self-insert-command
now takes around 0.07s-0.1s. I used two strategies for this: (i) breaking out
of (expensive) fontification routines early, when the region being
fontified is nothing but a string; (ii) Not fontifying the entire raw
string for a change to only a small part of it.
--
Alan Mackenzie (Nuremberg, Germany).
next reply other threads:[~2019-04-25 18:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-25 18:36 Alan Mackenzie [this message]
2019-04-26 1:25 ` Processing speed in large C++ raw strings Dmitry Gutov
2019-04-26 20:15 ` Tadeus Prastowo
2019-04-27 2:15 ` Stefan Monnier
2019-04-27 10:37 ` Tadeus Prastowo
2019-04-27 11:37 ` Alan Mackenzie
2019-04-27 15:35 ` Tadeus Prastowo
2019-04-27 17:29 ` Alan Mackenzie
2019-04-30 14:44 ` Tadeus Prastowo
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=20190425183615.GB19807@ACM \
--to=acm@muc.de \
--cc=dgutov@yandex.ru \
--cc=emacs-devel@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 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.