Merge remote-tracking branch 'origin/develop' into shadow-control-2.0
This commit is contained in:
commit
6fc929a0a0
26 changed files with 913 additions and 150 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue