-
-
Notifications
You must be signed in to change notification settings - Fork 648
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix #1079] Don't font-lock very long results
Font-locking extremely long strings is pretty slow (and might generate errors in some cases), so it's now conditional. This behavior is adjustable via `cider-font-lock-max-length`.
- Loading branch information
Showing
2 changed files
with
15 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6d70bcc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this related to #1115?
6d70bcc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure. It's just a theory of mine that it might be related to some extent, but I haven't benchmarked anything. The problem is definitely not 100% font-locking related as the REPL would grind to a halt even before there was Clojure font-locking for results.
6d70bcc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fwiw I've seen emacs lock up many times over long output, but I've never seen the stackoverflow issue. This leads me to believe they're unrelated and that #1079 might be some weird edgecase instead of a more common occurrence.
6d70bcc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True. I've had the same experience as you, @expez
6d70bcc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really care about the error, I just think font-locking huge strings is probably pretty expensive, so doing a big of optimization might be useful. As I said the original ticket is the oldest in the issue tracker, so this is definitely a problem which existing for a while. I didn't tackle it mostly because I hoped switching to comint would fix it, but it seems this is not going to happen any time soon.