Skip to content

Monaco editor not using web workers #375

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

Closed
andreimc opened this issue Mar 29, 2019 · 1 comment
Closed

Monaco editor not using web workers #375

andreimc opened this issue Mar 29, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@andreimc
Copy link

andreimc commented Mar 29, 2019

  • code-server version: off the serviceworker branch
  • OS Version: ubuntu 18.04

Description

If we enable web workers for monaco maybe we could use: https://github.com/Microsoft/monaco-editor-webpack-plugin or parts of it that enable the worker for monaco.

This would create a significant advantage since it will take monaco off the main thread.

simpleWorker.ts:35 Could not create web worker(s). Falling back to loading web worker code in main thread, which might cause UI freezes. Please see https://github.com/Microsoft/monaco-editor#faq
t.logOnceWebWorkerWarning @ simpleWorker.ts:35
t._getOrCreateWorker @ editorWorkerServiceImpl.ts:355
t._getProxy @ editorWorkerServiceImpl.ts:363
t._withSyncedResources @ editorWorkerServiceImpl.ts:378
t.computeLinks @ editorWorkerServiceImpl.ts:403
(anonymous) @ editorWorkerServiceImpl.ts:65
Promise.then (async)
provideLinks @ editorWorkerServiceImpl.ts:65
(anonymous) @ getLinks.ts:75
d @ getLinks.ts:74
(anonymous) @ links.ts:249
l @ async.ts:23
(anonymous) @ links.ts:249
(anonymous) @ tslib.es6.js:97
(anonymous) @ tslib.es6.js:78
(anonymous) @ tslib.es6.js:71
u @ tslib.es6.js:67
e.beginCompute @ links.ts:238
e.onModelChanged @ links.ts:226
(anonymous) @ links.ts:207
e.fire @ event.ts:584
t.setModel @ codeEditorWidget.ts:421
(anonymous) @ textFileEditor.ts:153
Promise.then (async)
(anonymous) @ textFileEditor.ts:135
Promise.then (async)
t.setInput @ textFileEditor.ts:134
t.doSetInput @ editorControl.ts:178
t.openEditor @ editorControl.ts:70
t.doShowEditor @ editorGroupView.ts:792
t.restoreEditors @ editorGroupView.ts:420
t @ editorGroupView.ts:144
t.create @ types.ts:169
e._createInstance @ instantiationService.ts:104
e.createInstance @ instantiationService.ts:69
t.createFromSerialized @ editorGroupView.ts:59
t.doCreateGroupView @ editorPart.ts:515
fromJSON @ editorPart.ts:894
t.deserializeNode @ grid.ts:460
t.deserializeNode @ grid.ts:453
t.deserialize @ grid.ts:489
t.doCreateGridControlWithState @ editorPart.ts:888
t.doCreateGridControlWithPreviousState @ editorPart.ts:850
t.doCreateGridControl @ editorPart.ts:822
t.createContentArea @ editorPart.ts:799
t.create @ part.ts:53
hn.createEditorPart @ workbench.ts:1280
hn.renderWorkbench @ workbench.ts:1236
hn.doStartup @ workbench.ts:439
hn.startup @ workbench.ts:385
(anonymous) @ main.ts:130
Promise.then (async)
(anonymous) @ main.ts:109
Promise.then (async)
n.open @ main.ts:107
t.main @ main.ts:333
(anonymous) @ workbench.ts:199
(anonymous) @ tslib.es6.js:97
(anonymous) @ tslib.es6.js:78
(anonymous) @ tslib.es6.js:71
u @ tslib.es6.js:67
e.initialize @ workbench.ts:167
(anonymous) @ client.ts:28
(anonymous) @ tslib.es6.js:97
(anonymous) @ tslib.es6.js:78
(anonymous) @ tslib.es6.js:71
u @ tslib.es6.js:67
(anonymous) @ client.ts:20
(anonymous) @ client.ts:92
(anonymous) @ tslib.es6.js:97
(anonymous) @ tslib.es6.js:78
s @ tslib.es6.js:68
Promise.then (async)
c @ tslib.es6.js:70
(anonymous) @ tslib.es6.js:71
u @ tslib.es6.js:67
e.task @ client.ts:80
r.initialize @ client.ts:20
e @ client.ts:57
r @ client.ts:18
(anonymous) @ client.ts:118
(anonymous) @ client.ts:118
r @ bootstrap:63
(anonymous) @ index.ts:1
r @ bootstrap:63
(anonymous) @ index.ts:2
r @ bootstrap:63
(anonymous) @ bootstrap:195
(anonymous) @ bootstrap:195
simpleWorker.ts:37 Cannot find module './workerMain.js'

Steps to Reproduce

  1. Merge the Added serviceworker and web-manifest #154
  2. Run code server - look at console
@andreimc andreimc added the bug Something isn't working label Mar 29, 2019
@andreimc andreimc changed the title Monaco editor not using service workers Monaco editor not using web workers Apr 4, 2019
@code-asher
Copy link
Member

Closing since the editor service runs in a worker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants