unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Processing speed in large C++ raw strings.
@ 2019-04-25 18:36 Alan Mackenzie
  2019-04-26  1:25 ` Dmitry Gutov
  2019-04-26 20:15 ` Tadeus Prastowo
  0 siblings, 2 replies; 9+ messages in thread
From: Alan Mackenzie @ 2019-04-25 18:36 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: emacs-devel

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).



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-04-30 14:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-25 18:36 Processing speed in large C++ raw strings Alan Mackenzie
2019-04-26  1:25 ` 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

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).