on-internet
← Community

Overlays make emacs really slow

Stack Overflow ·

I use hide-show to collapse certain parts of my text and I use the code below to show the number of hidden lines. However, when a file is large enough (e.g. C++ or LaTeX) and I collapse all regions (thus creating tens of overlays), Emacs becomes really slow to the point of being unusable. Even moving the marker from one line to another takes half a second or so. Is there a way of resolving this? (defun display-code-line-counts (ov) (overlay-put ov 'display (format "...%d..." (count-lines (overlay-start ov) (overlay-end ov)) )) (overlay-put ov 'face '(:foreground "red" :box (:line-width 1 :styl

Comments

Sign in or sign up to comment and upvote.

No comments yet.