From 731297bbd4fc171f6b2bbcae0247a0c3cfc99e5f Mon Sep 17 00:00:00 2001 From: JensLincke Date: Wed, 15 Nov 2023 12:33:30 +0100 Subject: [PATCH] removed systemjs worker logs SQUASHED: AUTO-COMMIT-src-worker-meta-worker.js,AUTO-COMMIT-src-worker-systemjs-worker.js, --- src/worker/meta-worker.js | 10 +++++----- src/worker/systemjs-worker.js | 14 +++++--------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/worker/meta-worker.js b/src/worker/meta-worker.js index 1432eab70..e54c38641 100644 --- a/src/worker/meta-worker.js +++ b/src/worker/meta-worker.js @@ -10,9 +10,9 @@ importScripts("./livelyworker.js") onmessage = function(evt) { - console.log("metaworker initial onmessage", evt) + // console.log("metaworker initial onmessage", evt) if (evt.data.message == "load") { - console.log("meta worker load " + evt.data.url) + // console.log("meta worker load " + evt.data.url) System.import("src/plugin-babel.js").then(() => { System.import("src/client/preferences.js").then((mod) => { var Preferences = mod.default @@ -23,7 +23,7 @@ onmessage = function(evt) { System.import(evt.data.url).then((m) => { postMessage({message: "loaded"}) self.onmessage = async (evt) => { - console.log("metaworker onmessage", evt) + // console.log("metaworker onmessage", evt) if(m.onrequest && evt.data && evt.data.message === "systemjs-worker-request") { try { @@ -37,13 +37,13 @@ onmessage = function(evt) { } } - console.log("metaworker custom onmessage", evt) + // console.log("metaworker custom onmessage", evt) if (m.onmessage) { m.onmessage(evt) } } }).catch((err) => { - console.log("meta worker error ", err) + // console.log("meta worker error ", err) postMessage({message: "error", value: err}) }) }) diff --git a/src/worker/systemjs-worker.js b/src/worker/systemjs-worker.js index 891dbf88f..8b8b72cf4 100644 --- a/src/worker/systemjs-worker.js +++ b/src/worker/systemjs-worker.js @@ -46,8 +46,7 @@ export default class SystemjsWorker { lively.error("[systemjs-worker]", msg.error || msg.value) } if (msg.message == "loaded") { - // console.log("worker loaded", url) - + // console.log("worker loaded", url) /*MD ### Important: here the actual client message is installed MD*/ this.metaworker.onmessage = (evt) => { console.log("systemjs-worker.js ON MESSAGE", evt) @@ -77,7 +76,7 @@ export default class SystemjsWorker { } handleRequest(msg) { - console.log("handleRequest ", msg) + // console.log("handleRequest ", msg) var resolve = this.resolveRequestForId.get(msg.id) var reject = this.rejectRequestForId.get(msg.id) if (!resolve) { @@ -86,7 +85,7 @@ export default class SystemjsWorker { this.resolveRequestForId.set(msg.id, null) this.rejectRequestForId.set(msg.id, null) if (!msg.error) { - console.log("FINISHED " + msg.id + " in " + (performance.now() - this.startTimeForId.get(msg.id)) + "ms response: " +msg.response ) + // console.log("FINISHED " + msg.id + " in " + (performance.now() - this.startTimeForId.get(msg.id)) + "ms response: " +msg.response ) resolve(msg.response) } else { reject(msg.error) @@ -96,7 +95,7 @@ export default class SystemjsWorker { async postRequest(...data) { let id = this.newId() - console.log("POST REQUEST " + id) + // console.log("POST REQUEST " + id) this.startTimeForId.set(id, performance.now()) let promise = new Promise((resolve, reject) => { this.resolveRequestForId.set(id, resolve) @@ -108,11 +107,8 @@ export default class SystemjsWorker { setTimeout(() => { var unhandledRequestResolve = this.resolveRequestForId.get(id) if (unhandledRequestResolve) { - console.log("TIMEOUT! " + id) reject( "request timeout after " + (performance.now() - start) + "ms") - } else { - console.log("NOOO TIMEOUT!" + id) - } + } }, this.timeout) } })