Skip to content
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

Typing in larger files is way too slow because of syntax highlighting lexer speed. #19

Closed
vsch opened this issue Sep 6, 2015 · 5 comments

Comments

@vsch
Copy link
Owner

vsch commented Sep 6, 2015

This is caused the by the lexer using pegdown for parsing and then generating lexer tokens based on the AST returned by pegdown.

Need to restore syntax highlighting for files back to using Annotator while leaving the lexer strictly for color setup sample document.

Annotator should reset attributes and provide new ones for syntax highlighting. This way the lexing will not affect typing speed and added benefit is that attributes will be combined as they were before lexer was added for syntax highlighting.

@vsch vsch added the usability label Sep 6, 2015
@vsch vsch added this to the Version 1.2.3 milestone Nov 17, 2015
@vsch vsch modified the milestones: Version 1.3.0, Version 1.2.3 Dec 1, 2015
@vsch
Copy link
Owner Author

vsch commented Dec 7, 2015

Did a test with syntax highlighting using a plain text lexer. Typing issues resolved and Psi parsing is not affected. This means that doing syntax highlighting with external annotator will do the trick and will not affect typing speed like the current implementation does.

@vsch vsch modified the milestones: Version 1.3.0, Version 1.4.0 Dec 21, 2015
@vsch
Copy link
Owner Author

vsch commented Jan 2, 2016

Temporary fix added option into preferences to turn off syntax highlighting. Annotations remain but this allows faster typing when in creative mode vs validation mode.

@vsch
Copy link
Owner Author

vsch commented Jan 6, 2016

The issue is now less severe with threading issues addressed. I will be implementing an external annotator which delays syntax highlighting until a later update phase. It will also allow more complex, layered attributes that lexer based syntax highlighting does not handle.

I will have to make the two syntax highlighting methods as options because only lexer based highlighting works in preferences color settings.

@vsch vsch added fixed :) and removed in progress labels Apr 25, 2016
@vsch
Copy link
Owner Author

vsch commented Apr 25, 2016

External annotator based syntax highlighting is now the defeault.

@vsch
Copy link
Owner Author

vsch commented Apr 25, 2016

  • minimize updates to unchanged parts of the paragraph or table

  • handle IDE skipping calls to handlers when fast typing (or rolling forehead on the
    keyboard).

  • HTML generation was not disabled when only main editor was shown. This would cause

  • Changed default syntax highlighter to external annotator based to reduce typing delay. If
    you want to use lexer based syntax highlighting you will need to change it in
    settings/preferences.

    Fastest typing response is achieved when:

    • syntax highlighting is turned off
    • wrap on typing is disabled
    • auto-format tables is disabled
    • all previews are turned off

@vsch vsch closed this as completed May 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant