[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Processing speed in large C++ raw strings.
From: |
Stefan Monnier |
Subject: |
Re: Processing speed in large C++ raw strings. |
Date: |
Fri, 26 Apr 2019 22:15:23 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
>> 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.
>
> I have been working with C++ template metaprograms for two years, and
> since quite early, I have experienced CC Mode being very sluggish that
> I often switch back-and-forth between cc-mode and text-mode.
Could you try out the "quick hack patch" I sent in
https://debbugs.gnu.org/35316 ?
It has a few known bugs, so it would require further work to be really
useful, but I'd be interested to know if it helps your use case.
> `emacs -Q' to visit the file locally. Then, to experience the
> sluggishness, I pressed M-> followed by M-v several times.
FWIW, I don't expect my patch will help this use-case.
Stefan