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

feat: parallel fetch #413

Closed
wants to merge 7 commits into from

Conversation

bodinsamuel
Copy link
Contributor

@bodinsamuel bodinsamuel commented Aug 23, 2019

  • add packagesFetcher
    It will prefetch at start and continuously fill a storage will we do saveDocs()

Samuel Bodin added 2 commits August 23, 2019 18:07
@bodinsamuel bodinsamuel self-assigned this Aug 23, 2019
@bodinsamuel bodinsamuel changed the title Feat/parallel fetch feat: parallel fetch Aug 24, 2019
@bodinsamuel bodinsamuel marked this pull request as ready for review August 26, 2019 07:40
@bodinsamuel bodinsamuel requested a review from Haroenv August 26, 2019 07:41
Copy link
Collaborator

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks really good! I have just a few questions

.babelrc Show resolved Hide resolved
src/npm/packagesFetcher.js Show resolved Hide resolved
src/npm/packagesFetcher.js Show resolved Hide resolved
src/bootstrap.js Show resolved Hide resolved
src/bootstrap.js Show resolved Hide resolved
src/datadog.js Show resolved Hide resolved
}
}

const packages = this.storage.splice(0, this.limit);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good call on removing them from the array, mutating will indeed likely be the fastest here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually I'm still hesitating with having "named page" in a object
{ '0-100': [...], '100-200': [...] } or with the nextKey { '@a/a': [...], '@a/ba': [...] }
this way we could fetch multiples pages in parallel and even process multiple pages in parallel

@bodinsamuel
Copy link
Contributor Author

It has been ported to #656

@bodinsamuel bodinsamuel deleted the feat/parallel-fetch branch July 12, 2021 15:48
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.

2 participants