Pagination can get slower over time
What would you like to be able to do? Can you provide some examples?
Admin dashboards have to list all resources (e.g., all users). As the number of resources grows, kaminari gets slower. This is because it uses offset/limit for pagination. Instead, we can use cursor-based pagination.
How could we go about implementing that?
We can take one of the following approaches.
- Switch to a pagination gem that provides cursor-based pagination (e.g.,
pagyit does not support paging). - Make the pagination feature pluggable and let users choose whatever library they want.
Can you think of other approaches to the problem?
No.
Edited: I thought about this a bit more. Making the pagination pluggable seems the way to go. Because 1: pagination gems come and go. 2: requirements vary.