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(frontend): improve syntax highlighter performance #3398

Merged
merged 1 commit into from
Nov 23, 2023

Conversation

jorgeepc
Copy link
Contributor

@jorgeepc jorgeepc commented Nov 23, 2023

This PR fixes a performance issue related to the react-syntax-highlighter package used to render the response body of a test. We were having issues when dealing with html types because the package does not support html as a language (see available languages here). Also, there are some performance problems described here that we are fixing by using a memoization approach.

Changes

  • fix html language type
  • memoize syntax highlighter component

Fixes

Checklist

  • tested locally
  • added new dependencies
  • updated the docs
  • added a test

Demo

2023-11-23 16 19 56

@jorgeepc jorgeepc self-assigned this Nov 23, 2023
@jorgeepc jorgeepc requested a review from xoscar November 23, 2023 21:23
@xoscar xoscar merged commit c54cda9 into main Nov 23, 2023
38 checks passed
@xoscar xoscar deleted the fix-syntax-highlighter-performance branch November 23, 2023 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants