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

Suggested solution to 'yielder' problem in resources.py #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

marlemion
Copy link

The yielder() took away the advantages of a generator: generate the data in place. By the yielder, the program had to go through the whole generator function before knowing the pagination. This became problematic for huge data sets (i.e. >15000). With the proposed design, the actual query is delivered alongside with the store to the generator function and the generator is fed with the restriction. The restriction is necessary, as only folder.items has a query parameter, whereas folder.folders and folder.items both have a restriction parameter.

The yielder() took away the advantages of a generator: generate the data in place. By the yielder, the program had to go through the whole generator function before knowing the pagination. This became problematic for huge data sets (i.e. >15000). With the proposed design, the actual query is delivered alongside with the store to the generator function and the generator is fed with the restriction. The restriction is necessary, as only folder.items has a query parameter, whereas folder.folders and folder.items both have a restriction parameter.
Forgot the most important part
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

Successfully merging this pull request may close these issues.

1 participant