Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defer evaluation on projected arrays #10

Open
tedsteen opened this issue Jan 3, 2014 · 5 comments
Open

Defer evaluation on projected arrays #10

tedsteen opened this issue Jan 3, 2014 · 5 comments

Comments

@tedsteen
Copy link

tedsteen commented Jan 3, 2014

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.

@SteveSanderson
Copy link
Owner

It would just be a bit more complex to implement. If it becomes a common requirement then I'd definitely consider implementing it.

@tp
Copy link

tp commented Aug 13, 2014

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.

@CraigCav
Copy link

👍 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.

@navnitmehta
Copy link

👍 This would be very useful addition.

@jrsearles
Copy link

+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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants