You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Observable arrays assume that their wrapped arrays can be sparse, and array change tracking appears to work on sparse arrays (even if it iterates numerically instead of by key). However, invoking map() on a sparse array produces an array which is no longer sparse, which significantly drops performance.
varsource=ko.observableArray(newArray(100000));// Object.keys(source()).length is 0varprojection=source.map(function(x){returnx*2;});// Object.keys(projection()).length is 100000
I get the impression that if the initial mapping process and the index update process iterated over the keys of the underlying arrays, then the projected array could remain sparse.
The text was updated successfully, but these errors were encountered:
Observable arrays assume that their wrapped arrays can be sparse, and array change tracking appears to work on sparse arrays (even if it iterates numerically instead of by key). However, invoking map() on a sparse array produces an array which is no longer sparse, which significantly drops performance.
I get the impression that if the initial mapping process and the index update process iterated over the keys of the underlying arrays, then the projected array could remain sparse.
The text was updated successfully, but these errors were encountered: