emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Typing latency
@ 2021-02-08 18:24 Sébastien Miquel
  2021-02-09  2:16 ` Russell Adams
                   ` (3 more replies)
  0 siblings, 4 replies; 26+ messages in thread
From: Sébastien Miquel @ 2021-02-08 18:24 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1759 bytes --]

I often get some unpleasant latency when editing org-mode
buffers. My use case combines a lot of special blocks and LaTeX
fragments, and the fontification seems to slow things down.

I've done some measurements using typometer
([[https://pavelfatin.com/typometer/]]). The numbers aren't very accurate
since it depends on external factors, such as how long the emacs
session has run.

AFAIU, the elisp profiler is useless in this case (fontification being
slow). At least my runs don't seem to report anything relevant.

The results are compiled below. In one of my use case (I've attached a
picture of what it looks like), I get up to 85 ms of delay, which is
very unpleasant.

| Mode                   | Content                    | Latency |
|------------------------+----------------------------+---------|
| Fundamental mode       | Generic                    | 25 ms |
| Org, w/o font locking  | Generic                    | 30 ms |
| Org-mode               | None                       | 30 ms |
| Org-mode               | Special blocks             | 47 ms |
| Org-mode               | LaTeX fragments            | 40 ms |
| Org-mode, new session  | Fragments + special blocks | 65 ms |
| Org-mode, long session | Fragments + special blocks | 80 ms |


  1. Is anyone experiencing something similar ?
  2. Are you aware of any better way to measure typing latency in emacs ?
  3. Is there any thing that can be done from the org-mode/elisp side of 
things ?
  4. Would offloading the fontification to ~tree-sitter~ be a possible 
way forward ?

Regards,

-- 
Sébastien Miquel


[-- Attachment #2: Slow.png --]
[-- Type: image/png, Size: 181899 bytes --]

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

end of thread, other threads:[~2021-03-02  5:11 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-08 18:24 Typing latency Sébastien Miquel
2021-02-09  2:16 ` Russell Adams
2021-02-09 14:06   ` Sébastien Miquel
2021-02-09  3:23 ` Ihor Radchenko
2021-02-09 14:56   ` Sébastien Miquel
2021-02-09 15:33     ` Ihor Radchenko
2021-02-09 22:30       ` Sébastien Miquel
2021-02-10  3:38         ` Ihor Radchenko
2021-02-10  6:18       ` Timothy
2021-02-10  6:58         ` Ihor Radchenko
2021-02-10  8:56       ` Eric S Fraga
2021-02-10 23:09         ` Samuel Wales
2021-02-14  4:39         ` Timothy
2021-02-14 10:36           ` Eric S Fraga
2021-02-14 12:45             ` Timothy
2021-02-15 11:33               ` Eric S Fraga
2021-02-15 18:29               ` Sébastien Miquel
2021-02-26 19:58                 ` [PATCH] ~org-font-lock-add-priority-faces~: ensure priority cookies are in a headline Sébastien Miquel
2021-03-02  5:10                   ` Kyle Meyer
2021-02-09  9:38 ` Typing latency Eric S Fraga
2021-02-09 14:09   ` Sébastien Miquel
2021-02-09 14:23   ` Christian Thäter
2021-02-11 16:21     ` Eric S Fraga
2021-02-11 16:25 ` Maxim Nikulin
2021-02-11 16:59   ` Ihor Radchenko
2021-02-13 15:49     ` Maxim Nikulin

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).