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

Isolate the heavy work of compressing files to a webworker #448

Closed
danilowoz opened this issue Apr 22, 2022 · 0 comments
Closed

Isolate the heavy work of compressing files to a webworker #448

danilowoz opened this issue Apr 22, 2022 · 0 comments

Comments

@danilowoz
Copy link
Member

Tell us how you think we can improve Sandpack

The process of compressing all files into a string (handled by lz-string) might be very expensive to the main thread, blocking the UI and degrading the experience.

What is this feature?

Instead of performing the compressing process inside the Sandpack component, we could move this logic to a webwoker and optimize the heaviest part of this process.

How would your idea work?

  • Create a webworker;
  • Reuse this webworker for all sandpacks on the page, I don't think we need a specific webworker for each sandpack;
  • Set a loading state in the "Open in CodeSandbox" button, as this will run async;

#442

@danilowoz danilowoz added feature:request triage New issues that needs consideration labels Apr 22, 2022
@danilowoz danilowoz removed the triage New issues that needs consideration label Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant