mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 13:39:22 +03:00
Speedup Knockout a bit
This commit is contained in:
parent
24681f8955
commit
8a461e7a3d
4 changed files with 164 additions and 200 deletions
|
|
@ -44,10 +44,9 @@
|
|||
|
||||
// Need to applyBindings *before* unmemoziation, because unmemoization might introduce extra nodes (that we don't want to re-bind)
|
||||
// whereas a regular applyBindings won't introduce new memoized nodes
|
||||
invokeForEachNodeInContinuousRange(firstNode, lastNode, node => {
|
||||
if (node.nodeType === 1 || node.nodeType === 8)
|
||||
ko.applyBindings(bindingContext, node);
|
||||
});
|
||||
invokeForEachNodeInContinuousRange(firstNode, lastNode, node =>
|
||||
(node.nodeType === 1 || node.nodeType === 8) && ko.applyBindings(bindingContext, node)
|
||||
);
|
||||
|
||||
// Make sure any changes done by applyBindings or unmemoize are reflected in the array
|
||||
ko.utils.fixUpContinuousNodeArray(continuousNodeArray, parentNode);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue