diff options
| author | João Távora | 2023-09-05 17:20:25 +0100 |
|---|---|---|
| committer | João Távora | 2023-09-05 18:27:42 +0100 |
| commit | 07454c47a62d9450f194dc0177a3a5b10846195b (patch) | |
| tree | 1d5dd384dbb121ee24073366b65d6c6c26cbd7bc /java | |
| parent | 2e7af2fc5304b9dfda944ced67b366e4576a1035 (diff) | |
| download | emacs-07454c47a62d9450f194dc0177a3a5b10846195b.tar.gz emacs-07454c47a62d9450f194dc0177a3a5b10846195b.zip | |
Flymake: speed up mode-line display with simple cache
When scrolling heavily (perhaps holding down C-n), the function
'flymake-mode-line-counter' showed very prominently in the memory and
CPU profiles.
Using a cache here was trivial, if not particularly pretty. The
function all but disappears from the profiles afterwards.
* lisp/progmodes/flymake.el (flymake--mode-line-counter-cache):
New variable.
(flymake--publish-diagnostics): Flush cache aggressively.
(flymake-mode-line-error-counter): Adjust.
(flymake--mode-line-counter-1): New helper from earlier
flymake--mode-line-counter.
(flymake--mode-line-counter): Use cache.
Diffstat (limited to 'java')
0 files changed, 0 insertions, 0 deletions