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

Replace kaminari with pagy #650

Open
brunoocasali opened this issue Oct 14, 2020 · 4 comments · Fixed by #681
Open

Replace kaminari with pagy #650

brunoocasali opened this issue Oct 14, 2020 · 4 comments · Fixed by #681
Labels
dependencies Pull requests that update a dependency file enhancement packages

Comments

@brunoocasali
Copy link
Contributor

Scope / difficulty

[medium] Replace kaminari with pagy in grape API.

Impact

Actually the kaminari implementation is easy to plug and play, but it have some disadvantages because it generates tons of objects in memory. The pagy implementation from the other side is small and consumes less memory. You can learn more about it here:

I think we could improve a lot the api timings with this change

@DeeDeeG
Copy link
Contributor

DeeDeeG commented Oct 14, 2020

Sounds like a good idea! API responsiveness and memory usage are definitely important for this web app. Thank you for the suggestion.

@DeeDeeG DeeDeeG added dependencies Pull requests that update a dependency file enhancement packages labels Oct 14, 2020
@GPrimola
Copy link
Contributor

@brunoocasali have you used/considered will_paginate?

@brunoocasali
Copy link
Contributor Author

Actually not, because pagy seems to be the best option to do this job, you can see on the links I've included in the description.

Do you have any experience comparing both on a real production workload, @GPrimola ?

@GPrimola
Copy link
Contributor

No @brunoocasali , I just have experience with will_paginate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file enhancement packages
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants