-
-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Description
For long lines (e.g. data URIs), CodeMirror turns off syntax highlighting to be more performant. However, other features (like brace matching) are not turned off. This can cause performance issues.
Steps to reproduce:
- Create an editor with brace matching enabled
- Open a file like https://github.com/adobe/brackets-edge-web-fonts/blob/master/styles/adobe-blank.css
- Place the cursor at the very end of a long line
- Use the back arrow to back the cursor up to the closing parenthesis
Expected behavior:
Fast, fast, fast
Actual behavior:
Slow, slow, slow
There are probably other performance issues with long lines (and long files). This is just one example.
I don't think we can ever expect that every feature we implement will be performant on large files. Instead, I wonder if the right solution might be something like:
- Have heuristics around when things might be slow (e.g. file and line length)
- Produce a warning / error when such heuristics are met, and turn the editor into a basic text editor
- Give the user a way to override the "turning into a basic text editor" behavior
Metadata
Metadata
Assignees
Labels
No labels