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

Use a global dataloader for the batch load function #4

Open
scf4 opened this issue Aug 7, 2017 · 3 comments
Open

Use a global dataloader for the batch load function #4

scf4 opened this issue Aug 7, 2017 · 3 comments

Comments

@scf4
Copy link

scf4 commented Aug 7, 2017

In my personal fork of redis-dataloader I use a final dataloader instance to coalesce redis mget calls. It's super helpful, saving ~3-4 round trips per request.

https://github.com/scf4/ioredis-dataloader/blob/master/index.js

Side note, if you'd be interested I'd like to merge my code into yours by adding node-redis support and passing tests, and then I could help with maintenance of the project.

@DubFriend
Copy link
Collaborator

DubFriend commented Aug 11, 2017

Hey ok that sounds great thanks!

One thing is I need this library to be compatible with at least node 6. I don't think the await/async stuff is supported until node 7?

Maybe I could put in some babel transpilation, I was thinking about adding support for flow types anyways.

@artgibson
Copy link

any async/await support in the works or suggestions on a library that is similar? @DubFriend @scf4

@PatrickJS
Copy link
Owner

@scf4 i think enough time has past where we can make these changes

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

4 participants