radicle-dev / radicle-client-services

Services backing the Radicle client interfaces.
Apache License 2.0
31 stars 13 forks source link

Add commit history pagination #131

Closed sebastinez closed 2 years ago

sebastinez commented 2 years ago

To reduce the loading time of big projects we should add pagination to the commit history. I propose similar to GitHub to split the commits into a fixed amount of ~30 commits, and add the query params page for the current queried page and per_page for the amount of commits per page.

We would still need to retrieve all commits with radicle_source::commit::commits but then we could use Vec::splice to remove the requested range of commit headers and yield them as output of the history handler.

cloudhead commented 2 years ago

Hmm perhaps we can also improve radicle_source.. but this is a good start.