Skip to content

Conversation

@Anemy
Copy link
Member

@Anemy Anemy commented Feb 18, 2025

COMPASS-8980
LeafyGreen's Code component gets laggy when given a large document (mostly from computing the dom highlighting). The exported schema json can get large, especially in the Extended format. This PR updates the export schema modal copyable output to be a code mirror read only editor. It renders it virtually and makes it a lot quicker to render.

Quick speed benchmarks on my machine, all collections are in Compass Data Sets, tested with the Extended format:

namespace render time before (ms) render time after (ms)
NYC.buildings 2616 65
NYC.trees 1979 50
sample_airbnb.lightingsAndReviews 15228 279
before after
Screenshot 2025-02-18 at 2 10 40 PM Screenshot 2025-02-18 at 2 09 57 PM

^ There's a copy button on the after if the user hovers over it.

@Anemy Anemy changed the title fix(schema): use editor for rendering schema export instead of LG code for performance fix(schema): use editor for rendering schema export instead of LG code for performance COMPASS-8980 Feb 18, 2025
@github-actions github-actions bot added the fix label Feb 18, 2025
@Anemy Anemy added feature flagged PRs labeled with this label will not be included in the release notes of the next release and removed fix labels Feb 18, 2025
@github-actions github-actions bot added the fix label Feb 18, 2025
@Anemy Anemy added the no release notes Fix or feature not for release notes label Feb 18, 2025
@Anemy Anemy requested a review from paula-stacho February 18, 2025 19:34
Copy link
Collaborator

@gribnoysup gribnoysup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small question, otherwise looks good

Copy link
Collaborator

@paula-stacho paula-stacho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@Anemy Anemy merged commit 95f88d4 into main Feb 20, 2025
21 of 22 checks passed
@Anemy Anemy deleted the COMPASS-8980-perf-preview-export-schema branch February 20, 2025 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature flagged PRs labeled with this label will not be included in the release notes of the next release fix no release notes Fix or feature not for release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants