WIP investigation

Pourquoi l'étape nextWithoutDefaults prend autant de temps ?
pull/138/head
mama 2017-12-12 20:37:42 +01:00
parent 3d091207f0
commit 69d33391e3
2 changed files with 5 additions and 1 deletions

View File

@ -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
}

View File

@ -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 {