Open tedsteen opened 10 years ago
It would just be a bit more complex to implement. If it becomes a common requirement then I'd definitely consider implementing it.
I was wishing for the same thing when implementing a tree structure. While there are many way to achieve lazy loading, I think having this feature in the library makes the code the cleanest.
:+1: This would be very useful. When performance is a key concern (as is the case when utilizing knockout-projections), it's often necessary to defer evaluation of calculated properties until they are needed.
:+1: This would be very useful addition.
+1
It doesn't seem like you'd want the mapping functions to be called until the observable is used. I think this library could be improved by leveraging some of the features added in the last couple releases of knockout. (defer updates, pure computeds, etc)
Whenever you create a projection it is evaluated immediately. Why not defer it?
After we moved over to knockout-projections the initial page load time was higher because all our filtered and mapped arrays where deferred until first usage in our implementation.