Skip to content

Editor Loading Improvements #5509

@Steve-Mcl

Description

@Steve-Mcl

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

  1. ACE is embedded in vendors.js (making it ~410kb larger than it needs to be)
  2. Monaco is bootstraped in such a way that it loads after vendors.js (compounding the load time)
  3. Monaco bootstrap uses document.write which causes a violation warning on load
    Image

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.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions