Switch from ko.computed to ko.pureComputed

This should provide performance and memory benefits over regular computed observables
This commit is contained in:
djmaze 2021-12-31 13:30:05 +01:00
parent ac2238a23f
commit 954de06f86
18 changed files with 55 additions and 37 deletions

7
dev/External/ko.js vendored
View file

@ -3,6 +3,13 @@ import { doc, createElement } from 'Common/Globals';
import { SaveSettingsStep } from 'Common/Enums';
import { arrayLength, isFunction } from 'Common/Utils';
/**
* The value of the pureComputed observable shouldnt vary based on the
* number of evaluations or other hidden information. Its value should be
* based solely on the values of other observables in the application
*/
export const koComputable = ko.pureComputed;
ko.bindingHandlers.tooltipErrorTip = {
init: (element, fValueAccessor) => {
doc.addEventListener('click', () => {