Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

fix: use streaming methods where possible #65

Merged
merged 3 commits into from
Jul 23, 2021

Conversation

achingbrain
Copy link
Member

The base adapter class calls .put repeatedly when .putMany is invoked
in order to reduce the number of methods a datastore has to implement to
be compatible with the datastore interface.

This hurts performance where datastores wrap other datastores that can
take advantage of the streaming methods to exectute certain operations in
parallel.

The change here is to call streaming methods from streaming methods where
it makes sense to do so, instead of letting the adapter class convert
streaming method invocations into serial method invocations.

The base adapter class calls `.put` repeatedly when `.putMany` is invoked
in order to reduce the number of methods a datastore has to implement to
be compatible with the datastore interface.

This hurts performance where datastores wrap other datastores that can
take advantage of the streaming methods to exectute certain operations in
parallel.

The change here is to call streaming methods from streaming methods where
it makes sense to do so, instead of letting the adapter class convert
streaming method invocations into serial method invocations.
@achingbrain achingbrain merged commit ec90398 into master Jul 23, 2021
@achingbrain achingbrain deleted the fix/use-streaming-methods branch July 23, 2021 16:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant