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

add Memoize support #100

Open
GoogleCodeExporter opened this issue Oct 27, 2015 · 2 comments
Open

add Memoize support #100

GoogleCodeExporter opened this issue Oct 27, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

I didn't see this as an existing issue when searching just now, but morelinq 
seems like a good place for a Memoize extension method.

The goal is to allow callers to iterate over a sequence multiple times, but 
caching the results so the inner/original sequence is still only iterated once.

The most common use case I've seen for this is when interacting with sql 
queries.  If you use ToList/ToArray or the like (as many people do), you end up 
forcing your code to wait until all the results have been pulled into memory 
from the server.  Memoize improves this situation by allowing you to start 
pulling from the queryable immediately, but without having to incur the penalty 
if you end up needing to iterate over it multiple times (as the data gets 
cached as it's been pulled from the source).

An example gist can be found here to get across the idea:

https://gist.github.com/thomaslevesque/3345186

Original issue reported on code.google.com by james.ma...@gmail.com on 1 May 2015 at 2:40

@GoogleCodeExporter
Copy link
Author

Should I file this somewhere else or just leave it here until the migration to 
another project host is completed?

Original comment by james.ma...@gmail.com on 4 May 2015 at 3:45

@GoogleCodeExporter
Copy link
Author

This issue has been migrated to:
https://github.com/MoreLINQ/morelinq/issues/100
The conversation continues there.
DO NOT post any further comments to the issue tracker on Google Code as it is 
shutting down.
You can also just subscribe to the issue on GitHub to receive notifications of 
any further development.

Original comment by azizatif on 21 Aug 2015 at 6:56

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

No branches or pull requests

1 participant