Replies: 3 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
-
|
By my rough calculations, this represents ~36% faster loading (at least perceived) |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
FYI: There are 2 branches to accompany this:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
TLDR
By my rough calculations, removing ACE from vendors and loading Monaco async is ~36% faster (perceived). In real world terms it is between 23%~36% faster.
Current State
document.writeto load scripts. This causes the loading of the editor to be synchronous and block the UI until it is loaded.vendors.jshas loaded and executed (which is already delayed by the inclusion ACE in vendors)Issues Loading code editor
document.writeto load scripts, which is not ideal (MDN marks it as deprecated - https://developer.mozilla.org/en-US/docs/Web/API/Document/write)Recommended Changes
index.mst(via a mustache conditional which calls a bootstrap to load it) same as Monaco.document.writeto load scripts, but instead create script elements and append to the DOM. This will allow them to load asynchronously and not block the UI.Benefits
Care points
window.acedirectly. By removing ACE from the vendors bundle, we may want to ensure that something is available onwindow.aceto prevent errors in those nodes.window.ace = { edit => { return RED.editor.codeEditor.basic.create } }Beta Was this translation helpful? Give feedback.
All reactions