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

Avoid unnecessary fetch for obtaining dictionaries #880

Merged
merged 1 commit into from
Mar 16, 2023

Conversation

dtrucs
Copy link
Collaborator

@dtrucs dtrucs commented Mar 14, 2023

The contents are linked to dictionaries such as cities, different types of categories, etc.
The application needs to get all elements at once whatever the count of items.

To do this, it fetches the first page of the list and retrieves the total count of items with the result.

If there are no others pages, it returns this result.
If not, it parallelizes the fetch of all pages to return the new result.

This PR concerns the "if not" part and avoids to re-fetch the first page, and concatenate its result with the news ones.

@dtrucs dtrucs force-pushed the develop branch 4 times, most recently from 1c45f81 to 9c7ca08 Compare March 15, 2023 16:04
@dtrucs dtrucs force-pushed the Avoid-uncessary-fetch-for-obtaining-dictionaries branch from 91fe631 to 7d070e5 Compare March 16, 2023 10:32
@dtrucs dtrucs merged commit 2a13b5e into develop Mar 16, 2023
@dtrucs dtrucs deleted the Avoid-uncessary-fetch-for-obtaining-dictionaries branch March 21, 2023 09:09
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