javascript - Knockout computed observables extremely slows down browser on larger datasets -
i'm working nested viewmodel-objects , knockoutjs , ran annoying troubles using it. lets have nested model this:
-totals (some totalization of clients, contains array of clientscontainer, ~10 computed observables)
-clientcontainer (some totalization of clients moneyaccounts, contains array of moneyaccounts, ~10 computed observables)
--moneyaccounts (some totalization of accountpositions, contains array of accountpositions, ~25 computed observables)
----accountpositions (~25 computed observables, ~25 computed observables)
i mapped viewmodel js structure (35 clientscontainer, each client container contains 10 moneyaccount, each moneyaccount contains 2 positions)
first, figured out computedobservables on accountpositions not refreshed after being initialized. so, had force refresh using dummyobservable in each computedfunction , calling knockouts notifysubscribers()-function.
it seems method extremely expensive regarding performance, if have 700 accountpositions on whole viewmodel (which isn't much..). had delay each refresh-call 500 millisecons prevent browser hanging completely. now, browser overwhelmed. takes 15minutes render data table, definitly should load faster..
what missing here? there "techniques" load/initialize nested viewmodel structures faster? or knockout unable manage such data-sets great performance?
thanks in advance
Comments
Post a Comment