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
arrayPushAll will make 1000 push calls, which each update the binding separately. Although one could argue that arrayPushAll should work better, this code should use the recommended approach:
self.add = function () {
startMeasure("add");
self.data.push.apply(self.data, buildData(1000));
stopMeasure();
};
The text was updated successfully, but these errors were encountered:
@mbest, not sure if this change had an impact on the results. The 'append 1k rows to large table' test still shows a very strange difference in execution time. Also, not clear if round 7 included this update, but the PR was merged in october, and Round 7 was published in november, so I'm assuming the change is in round 7.
I was wrong on how I read the Knockout code surrounding arrayPushAll, which is actually pretty much the same as push.apply. Thus the problem is actually deeper in Knockout regarding changes to large arrays. This should become better with Knockout 3.5 (knockout/knockout#2324).
js-framework-benchmark/knockout-v3.4.1-keyed/src/Main.js
Line 59 in c3488d6
arrayPushAll
will make 1000push
calls, which each update the binding separately. Although one could argue thatarrayPushAll
should work better, this code should use the recommended approach:The text was updated successfully, but these errors were encountered: