Merge remote-tracking branch 'origin/develop' into shadow-control-2.0

This commit is contained in:
Henry Jameson 2024-09-26 01:10:57 +03:00
commit 6fc929a0a0
26 changed files with 913 additions and 150 deletions

View file

@ -522,9 +522,21 @@ export const init = ({
console.debug('Eager processing took ' + (t2 - t1) + ' ms')
}
// optimization to traverse big-ass array only once instead of twice
const eager = []
const lazy = []
result.forEach(x => {
if (typeof x === 'function') {
lazy.push(x)
} else {
eager.push(x)
}
})
return {
lazy: result.filter(x => typeof x === 'function'),
eager: result.filter(x => typeof x !== 'function'),
lazy,
eager,
staticVars,
engineChecksum
}