From 04ffda276e0294996431da8aca3584918873ae4f Mon Sep 17 00:00:00 2001 From: jmoenig Date: Mon, 12 Jan 2015 10:17:13 +0100 Subject: Speed up messages received by clones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Don’t highlight scripts running inside clones (boosts performance), Thanks, @aranlunzer, for the hint! --- threads.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'threads.js') diff --git a/threads.js b/threads.js index 791d81c..555e531 100644 --- a/threads.js +++ b/threads.js @@ -9,7 +9,7 @@ written by Jens Mönig jens@moenig.org - Copyright (C) 2014 by Jens Mönig + Copyright (C) 2015 by Jens Mönig This file is part of Snap!. @@ -83,7 +83,7 @@ ArgLabelMorph, localize, XML_Element, hex_sha512*/ // Global stuff //////////////////////////////////////////////////////// -modules.threads = '2014-December-17'; +modules.threads = '2014-January-12'; var ThreadManager; var Process; @@ -159,9 +159,11 @@ ThreadManager.prototype.startProcess = function ( active.stop(); this.removeTerminatedProcesses(); } - top.addHighlight(); newProc = new Process(block.topBlock(), callback); newProc.exportResult = exportResult; + if (!newProc.homeContext.receiver.isClone) { + top.addHighlight(); + } this.processes.push(newProc); return newProc; }; -- cgit v1.3.1