From 8aa65c7c85ae5e3765b0cf82a56ecc648deff34f Mon Sep 17 00:00:00 2001 From: jmoenig Date: Wed, 22 Apr 2020 09:51:58 +0200 Subject: [PATCH] speed-up WARP by eliminating the yield at the end now possible due to the new Morphic2 architecture --- src/threads.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/threads.js b/src/threads.js index b9a18a8d..bf41297c 100644 --- a/src/threads.js +++ b/src/threads.js @@ -2074,8 +2074,10 @@ Process.prototype.doWarp = function (body) { stage.fps = 0; // variable frame rate } } - this.pushContext('doYield'); - this.context.isCustomBlock = isCustomBlock; + // this.pushContext('doYield'); // no longer needed in Morphic2 + if (this.context) { + this.context.isCustomBlock = isCustomBlock; + } if (!this.isAtomic) { this.pushContext('doStopWarping'); }