From 544d78f461d93ede402fb6ea1e30af7673a37c16 Mon Sep 17 00:00:00 2001 From: n1474335 Date: Wed, 14 Feb 2018 13:08:03 +0000 Subject: [PATCH] The Magic operation now only checks the most commonly used Internet languages by default, to lower false positives and improve performance. --- src/core/FlowControl.js | 3 +- src/core/config/OperationConfig.js | 5 ++ src/core/lib/Magic.js | 104 ++++++++++++++++------------- 3 files changed, 64 insertions(+), 48 deletions(-) diff --git a/src/core/FlowControl.js b/src/core/FlowControl.js index e066094c..4c1e6a61 100755 --- a/src/core/FlowControl.js +++ b/src/core/FlowControl.js @@ -267,10 +267,11 @@ const FlowControl = { runMagic: async function(state) { const ings = state.opList[state.progress].getIngValues(), depth = ings[0], + extLang = ings[1], dish = state.dish, currentRecipeConfig = state.opList.map(op => op.getConfig()), magic = new Magic(dish.get(Dish.ARRAY_BUFFER)), - options = await magic.speculativeExecution(depth); + options = await magic.speculativeExecution(depth, extLang); let output = `