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

fix: don't highlight code examples in returned error messages #166

Merged
merged 1 commit into from
Mar 27, 2023

Conversation

erunion
Copy link
Member

@erunion erunion commented Mar 27, 2023

🧰 Changes

When supplied with a very large file, that has a very large amount of errors, returning errors can take upwards of minutes due to the code highlighting work in @babel/highlight (way way of @babel/code-frame) highlighting our supplied file for each error supplied.

For example on an OpenAPI definition that is 2MB+, that also has 20 errors, simply rendering our our errors took up to 21 seconds. Without this code highlighting work? 2 seconds.

screen_shot_2023-03-24_at_4 21 39_pm

@erunion erunion added the bug Something isn't working label Mar 27, 2023
@erunion erunion merged commit 989af8f into main Mar 27, 2023
@erunion erunion deleted the fix/large-file-memory-leak branch March 27, 2023 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant