m-fleury / isabelle-emacs

Clone of isabelle, with LSP extensions in seperate branches
Other
25 stars 5 forks source link

[emacs-28.0] speed regression #51

Closed m-fleury closed 2 years ago

m-fleury commented 3 years ago

There seem to be a very recent speed regression in the upcoming emacs release due to thing-at-point being much slower than it was before. This impacts everything using thing-at-point including:

m-fleury commented 3 years ago

I cannot fix the lsp-ui-mode issue however.

m-fleury commented 3 years ago

Here is a benchmark to show the problem:

(require 'benchmark)

(defun my/test-word-at-point ()
  (let* ((elapsed (benchmark-elapse (dotimes (number 3) (word-at-point (point)))))
    (report  (format "%.5f seconds" elapsed)))
  report))

Without overlays, we get timings like

"0.02450 seconds"
"0.03119 seconds"
"0.02548 seconds"

On a fully-processed Isabelle theory, the timing is daunting:

"1.96788 seconds"
"146.88098 seconds"

(This is not a typo!).

m-fleury commented 3 years ago

Long version short: there is now a work-around, but that could mess up with other packages: I replace the new (slow) thing-at-point by the old (fast) version.