Open Bug 1527903 Opened 5 years ago Updated 2 years ago

Don't include all addons and modes in the CodeMirror bundle

Categories

(DevTools :: Shared Components, enhancement)

enhancement

Tracking

(Not tracked)

ASSIGNED

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

Details

At the moment, the CodeMirror bundle is a big file that includes a lot of different things:

  • key bindings (emac, vim, sublime)
  • addons (search, fold, …)
  • highlighter (scss, jsx, …)

This bundle is then loaded by every consumer of the source editor (inspector, console, style editor, debugger, netmonitor, …).
Since the file is big, it takes a lot of time to load, even more on slow machine (for example, on the reference hardware there's 1.5s spent loading codemirror for the console).

Clearly the bundle is a jungle, and each panel might want different flavor of bananas.

We shouldn't include additional files that are not needed by every consumer, but have dedicated flags in the config to load those file individually, depending on what the consumer need.

This should have a positive impact on almost every panel in the toolbox.

Depends on: 1530255
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.