haskell / haskell/haskell-mode

very slow fontification with multiline strings

Open
#1,674 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
1.4k
Forks
354
Avg merge
5d 10h
Merged PRs (30d)
2

Description

After checking out newest git 56d67ee282294c786a92e2d83c5bebf1a6d919c1 of haskell-mode, I do
```
$ make
$ wget https://raw.githubusercontent.com/wrengr/bytestring-trie/e149ccfb1124feb11aba04f3e2b1e5a557220e4c/src/Data/Trie/ArrayMapped/SparseArray.hs
$ emacs -Q -L . --eval "(progn (require 'haskell-mode) (find-file \"SparseArray.hs\") (eldoc-mode -1) (goto-line 248) (profiler-start 'cpu))" SparseArray.hs
```
ie. open line 248 of a "big" (just 2331 lines) file, and edit the string to be a multiline one:

![haskell-mode-multiline-slow](https://user-images.githubusercontent.com/56868/63160385-ecbe7480-c01d-11e9-9590-23bb67914426.gif)

be patient – I'm typing a second `"` when it seems like the video has stopped ;)

I see slowdowns all over the place whenever I have `\`'s out of balance (sometimes it seems fontification gets into a bad state too with these and I have to reopen the file, though that may be a separate issue?)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.