[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Processing speed in large C++ raw strings.
From: |
Alan Mackenzie |
Subject: |
Processing speed in large C++ raw strings. |
Date: |
Thu, 25 Apr 2019 18:36:15 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
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).
- Processing speed in large C++ raw strings.,
Alan Mackenzie <=