-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Editor Loading Improvements #5509
Description
Related Design Note: node-red/designs#88
While preparing Monaco update PR #5508 I have noted the document.write violations which led me down a rabbit hole of (re)discoveries and ideas. In short, I suspect we can make a reasonable improvement in loading times. The TLDR is:
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.
Issues I see
- ACE is embedded in
vendors.js(making it ~410kb larger than it needs to be) - Monaco is bootstraped in such a way that it loads after
vendors.js(compounding the load time) - Monaco bootstrap uses
document.writewhich causes a violation warning on load

I have discussed this and more in design note #88, where I show timings, address gotchas, and discuss a potential path forward.
I am more than happy to raise a PR from the branch I used in testing but would appreciate some feedback (good or bad) first (in case I am on the wrong track or it is not something we want to touch).
Ta.