-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance issues #38
Comments
I think most of the performance can be won by the third solution. This is a common solution in most IDEs which also use regex-based syntax highlighting. Not sure what you mean by the following:
Is it when viewport has changed (e.g. resizing, scrolling) or upon changing the content? |
Both, though I'd say the first step would be only when changing the content, on a line-per-line basis. Since it's using NSAttributedString in the background, resizing and scrill won't change anything if the whole thing already got rendered. |
Wouldn’t this mean that pasting large amount of text would be slow if it had to parse all the text to highlight it. I can see an issue if it only highlights the text that is visible in the viewport. Scrolling and resize would not update the highlighting. |
Correct, first paste would be a bit slow but I think that's an ok tradeoff for a first improvement. The biggest issue right now is the slowness when typing in a large document |
Fixed in release 1.3.0 |
Currently, the syntax highlighting is not super optimized, which cause performance issues on large strings.
Possible solutions:
The text was updated successfully, but these errors were encountered: