One handy way is to keep the DOM tree light(er). Knockout offers an easy way to remove unused DOM fragments: By using the ko:if binding – instead of the ko:visible binding.
On the UI both of them serve to show/hide widgets. The difference is that the, if binding removes DOM elements if they are not being displayed as opposed the visible binding which only toggles visibility. Official docs.