diff options
author | Theodor Thornhill <theo@thornhill.no> | 2024-03-30 20:52:41 +0100 |
---|---|---|
committer | Theodor Thornhill <theo@thornhill.no> | 2024-04-03 15:02:16 +0200 |
commit | 08c80c45ddea17df87fc768a39dff353ccc13d3b (patch) | |
tree | a649606fee9322085ed24441a2c5a560a9889248 /lisp/emacs-lisp/regexp-opt.el | |
parent | 48dc75f2353152158fa325f5fbf154cdc75e8cfa (diff) | |
download | emacs-08c80c45ddea17df87fc768a39dff353ccc13d3b.tar.gz emacs-08c80c45ddea17df87fc768a39dff353ccc13d3b.tar.bz2 emacs-08c80c45ddea17df87fc768a39dff353ccc13d3b.zip |
Don't use file-truepath in Eglot (bug#70036)
`file-truepath' is slow because of recursive calls and being implemented
in lisp. It seems to not be needed in eglot, but it is used behind the
scenes in `find-buffer-visiting', thus appearing in profiles. Moving
the implementation to a hash map will yield similar performance
benefits, but wouldn't require us to rewrite `file-truename' in C.
* lisp/progmodes/eglot.el (eglot-lsp-server): Convert 'managed-buffers'
to a hashmap.
(eglot-uri-to-path): Don't use file-truepath, as it is too slow to be
included in the hot path.
(eglot--on-shutdown): Use buffers from buffer map.
(eglot--managed-mode): Add buffer to map, rather than list. Also remove
it from the map on deactivation.
(eglot-handle-notification): Expose server and get buffer from the
buffer map.
Diffstat (limited to 'lisp/emacs-lisp/regexp-opt.el')
0 files changed, 0 insertions, 0 deletions