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

Improve performance when syntax errors break entire files #3745

Closed
w0rp opened this issue May 28, 2021 · 1 comment
Closed

Improve performance when syntax errors break entire files #3745

w0rp opened this issue May 28, 2021 · 1 comment
Assignees

Comments

@w0rp
Copy link
Member

w0rp commented May 28, 2021

Often when editing certain file types, syntax errors introduced during editing towards the start of large files can slow down to the point where you have to disable ALE in order to continue editing a file. This is because certain tools behave poorly when a syntax error is encountered and file your entire file with errors. One approach we've taken in the past is to limit the amount of data that ALE will process. The problem with this approach is that the amount of data that a developer machine can process depends on the machine, and it requires too much configuration.

What we should do instead is add an optional setting for linter definitions to define a filter function which can be used for filtering the results of the loclist items either returned from LSP/tsserver, or from the linter's callback. This function can be used for any kind of filtering at all, and can immediately be used for slicing out all of the linter items up to the first problem that can be recognised as a syntax error. That way, all processing in ALE will stop on the first syntax error for specific linters, which will greatly improve performance.

@w0rp w0rp self-assigned this May 28, 2021
@w0rp
Copy link
Member Author

w0rp commented Feb 3, 2023

Superseded by #4208.

@w0rp w0rp closed this as completed Feb 3, 2023
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