Spacemacs-rocks icon indicating copy to clipboard operation
Spacemacs-rocks copied to clipboard

show-paren-mode打开Python大文件非常卡顿

Open ZhengWG opened this issue 5 years ago • 0 comments

发现在打开600行的大文件的时候非常卡顿,通过profiler-start,profile-report得到是fix-show-paren-function这部分的问题,只能删除。。不知有没有其他解决方案,相关代码:

(define-advice show-paren-function (:around (fn) fix-show-paren-function)
  (cond ((looking-at-p "\\s(") (funcall fn))
     (t (save-excursin
          (ignore-errors (backward-up-list))
          (funcall fn)))))

ZhengWG avatar May 09 '19 15:05 ZhengWG