Skip to content

Add pagination of some sorts to series/playlist blocks #1562

@LukasKalbertodt

Description

@LukasKalbertodt

When a series/playlist gets too long, the page gets noticable slower. Take this for example: https://video.ethz.ch/speakers/lecture

On my development machine it's still ok, but my iPhone struggles a lot. There are multiple problems: network request size (1.1MB in the example above, for 1500 events), React rendering performance, browser rendering performance. We should optimize what's easy to optimize but also add pagination of some sorts.

Backend pagination (where the API only returns the items on the current page) is significantly more complex but has the obvious advantage that we avoid transmitting too much data at once. But we should take a look at how we can reduce the transmitted data regardless. For one, we always transmit the description, which is only shown when users switch to the list view. That's the minority of cases in my experience, so it would be nice to not transmit description then. Same goes for series information. In the example at hand, the descriptions are super short though, so that's not even the bulk of the MB. The thumbnail needs quite a few infos to render. One might investigate whether the backend can pack the relevant information into a more dense thumbnail-specific field.

Frontend pagination would already help with the rendering performance a lot. But it's probably also worth it to check if we can somehow improve rendering performance for the browser for example. We are using filters for thumbnails in dark mode: is that a problem?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions