apavlidi / IT_API

The Internet services of the IT department of Alexander Technological Education Institute of Thessaloniki
http://api.it.teithe.gr/
MIT License
14 stars 5 forks source link

Announcements server-side pagination #97

Closed theokyr closed 4 years ago

theokyr commented 4 years ago

Right now, the API returns all pages instantly on a single call. That can really slow down the usage of the Client application, especially on a slow internet connection. On production, the response to /api/announcements is roughly 2.1MB. That's big! Results can be paginated directly from the API (e.g. using cursor methods on the database).

Although it's not related to the API, as far as I know the Client app uses DataTables which can support server-side paginated content without much pain, given you have correctly set the parameters related to the total available data.

theokyr commented 4 years ago

It seems like the API does support pagination natively, but it is not used in the Client application. I'm closing this issue, seeing as this it is not related to the API.