diff --git a/source/engine/mecanisms.js b/source/engine/mecanisms.js index 4feac591a..6becac48c 100644 --- a/source/engine/mecanisms.js +++ b/source/engine/mecanisms.js @@ -458,7 +458,7 @@ export let mecanismInversion = dottedName => (recurse, k, v) => { let evaluatedNode = rewriteNode(node, nodeValue, null, collectMissing) // rewrite the simulation cache with the definitive inversion values - + R.toPairs(inversion.inversionCache).map(([k,v])=>cache[k] = v) return evaluatedNode } diff --git a/source/reducers.js b/source/reducers.js index 504eaba0c..8d25baf33 100644 --- a/source/reducers.js +++ b/source/reducers.js @@ -64,8 +64,11 @@ export let reduceSteps = (tracker, flatRules, answerSource) => ( let parsedRules = R.path(['analysis', 'parsedRules'], state), + date = Date.now(), analysis = analyseMany(state.parsedRules, targetNames)(situationWithDefaults(state)), + yaya = console.log('Date.now(', Date.now() - date), nextWithDefaults = getNextSteps(situationWithDefaults(state), analysis), + yaaya = console.log('Date.now2(', Date.now() - date), assumptionsMade = !R.isEmpty(rulesDefaults), done = nextWithDefaults.length == 0 @@ -83,6 +86,7 @@ export let reduceSteps = (tracker, flatRules, answerSource) => ( nextWithoutDefaults(state, analysis, targetNames, intermediateSituation) : {currentQuestion: head(nextWithDefaults), nextSteps: nextWithDefaults, }) } + console.log('Date.now3(', Date.now() - date) if (action.type == START_CONVERSATION) { return {