Closed csbun closed 3 years ago
In packages/compile-code/src/template/logic.ts#_getNextNodes(), imove-branch node conditions will be tested as much times as this.edges.length cuz the checking code were placed in the for (const edge of this.edges) loop. We can move them out the loop so it will run only once.
imove-branch
this.edges.length
for (const edge of this.edges)
We've read your pull request. This problem does exist in our code, and it is wise to move the code of branch node to the outside of loop. Thank you very much for your commit.
In packages/compile-code/src/template/logic.ts#_getNextNodes(),
imove-branch
node conditions will be tested as much times asthis.edges.length
cuz the checking code were placed in thefor (const edge of this.edges)
loop. We can move them out the loop so it will run only once.