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

perf(monaco): make sure monaco is loaded only once #67

Merged
merged 3 commits into from
Jun 11, 2019

Conversation

emoralesb05
Copy link
Collaborator

@emoralesb05 emoralesb05 commented Jun 8, 2019

We are going to set an id in the script tag that loads monaco so we avoid duplicate load scripts when rendering multiple code editors at the same time.

Also we are going to check if monaco has been loaded via an interval and observable rather than a promise to separate concerns and being able to cancel the observable if needed.

Added also some utility functions to help with that and enable developers hook into them.

Copy link

@JulieMarie JulieMarie left a comment

Choose a reason for hiding this comment

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

LGTM

@emoralesb05 emoralesb05 merged commit 7df5d9d into develop Jun 11, 2019
@emoralesb05 emoralesb05 deleted the perf/load-monaco-once branch June 11, 2019 04:45
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

Successfully merging this pull request may close these issues.

2 participants