harvard-lil / perma

Indelible links
424 stars 71 forks source link

Remove count from pagination #3634

Closed bensteinberg closed 1 month ago

bensteinberg commented 1 month ago

As discussed in Slack, this speeds up slow folder loads in the API when a folder has many links, at the cost of changing the conventional behavior of the API. Previously, a client consuming paginated results could stop when the next link was null; now, such a client should keep consuming pages and following next links until objects is an empty list.

bensteinberg commented 1 month ago

I'm taking a look at https://github.com/harvard-lil/perma-extension to see whether this change will require a change to the extension.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 69.60%. Comparing base (56cca5b) to head (30c55d1). Report is 3 commits behind head on develop.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #3634 +/- ## ======================================== Coverage 69.59% 69.60% ======================================== Files 54 54 Lines 7337 7339 +2 ======================================== + Hits 5106 5108 +2 Misses 2231 2231 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

bensteinberg commented 1 month ago

I'm taking a look at https://github.com/harvard-lil/perma-extension to see whether this change will require a change to the extension.

(I don't see any use there of total count or the next link, but I'd love a second opinion.)