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

Generator-Experiments should append results of each yield, not overwrite #136

Open
petered opened this issue Oct 4, 2018 · 0 comments
Open

Comments

@petered
Copy link
Contributor

petered commented Oct 4, 2018

Performance/Memory wise, it makes sense to just append the results of generator-experiments to file. Right now it just overwrites the results, so you need to build a growing data structure in your experiments and yield the whole thing every time.

We should still leave in the old option though as not all generator-experiment will involve linearly growing data structures.

To do this properly, we should have a way of accessing the latest element without reading the whole file, so we need to make or find something like an IndexedPickleFile object that maintains both a data and an index file.

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

1 participant