Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pagination on past events #36

Open
srosset81 opened this issue Jan 28, 2023 · 2 comments
Open

Add pagination on past events #36

srosset81 opened this issue Jan 28, 2023 · 2 comments
Labels
good first issue Good for newcomers

Comments

@srosset81
Copy link
Contributor

It causes performances problems

@srosset81 srosset81 added the good first issue Good for newcomers label Jun 13, 2023
@Laurin-W
Copy link
Collaborator

To understand the issue correctly, does this occur when fetching from /:user:/events?
Testing on my local machine, for 116 events, the request took 4-7s.

I'm not sure what kind of implementation direction this would take. Three came to my mind right now:

  1. Use a URI parameter to filter events from the past
  2. Implement LDP Paging spec
  3. Implement [ActivityPub Paging] as done for the in/outboxes as well.

Do you have a preference for either or were you thinking of something else?

@srosset81
Copy link
Contributor Author

The idea would be to first implement pagination on the frontend, so that not all events are shown. React-Admin has a component for this which could be used out-of-the-box:
https://marmelab.com/react-admin/doc/3.19/List.html#paginating-the-list

With this solution, all events will be fetched (because we haven't found an easy way yet to paginate SPARQL query results) but at least they will not all be rendered. On old mobile phones, rendering many events can take many seconds.

But it's true the optimal solution would be either:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants