Speed up fetching of posts in PleromaFE #817

Open
opened 2020-03-30 18:00:41 +00:00 by feld · 5 comments
Owner

Currently, it seems to wait for some unrelated endpoints to return first. Might even be possible to do it right at the start without waiting for the config.json to return.

I've observed this too. When you load a user profile, for example, the first call to /api/v1/accounts/:id/statuses is to fetch the pinned posts, and once that completes it seems to fire off a GET to /api/v1/accounts/:id/statuses for the profile timeline and the media_only timeline.

If we could reduce the user profile timeline to a single API call (one RTT to the database) that would be ideal. Perhaps we could get the BE to ignore pinned=true if max_id is set as well? This just means the FE could request 20 statuses and receive 20 + pinned, but that shouldn't be a deal breaker.

Additionally it seems like the notifications panel timeline isn't fetched concurrently either.

> Currently, it seems to wait for some unrelated endpoints to return first. Might even be possible to do it right at the start without waiting for the config.json to return. I've observed this too. When you load a user profile, for example, the first call to `/api/v1/accounts/:id/statuses` is to fetch the pinned posts, and once that completes it seems to fire off a GET to `/api/v1/accounts/:id/statuses` for the profile timeline and the `media_only` timeline. If we could reduce the user profile timeline to a single API call (one RTT to the database) that would be ideal. Perhaps we could get the BE to ignore `pinned=true` if `max_id` is set as well? This just means the FE could request 20 statuses and receive 20 + pinned, but that shouldn't be a deal breaker. Additionally it seems like the notifications panel timeline isn't fetched concurrently either.

I don't understand the point about the pinned=true if max_id is set. What's supposed to happen there?

I don't understand the point about the `pinned=true` if max_id is set. What's supposed to happen there?

@shpuld that's solved now, right?

@shpuld that's solved now, right?
Owner

uhh, haven't done anything about it though, so not sure

uhh, haven't done anything about it though, so not sure

I meant pulling the stickers and tos out of the blocking part

I meant pulling the stickers and tos out of the blocking part
Owner

there's other stuff mentioned in the OP too

there's other stuff mentioned in the OP too
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pleroma/pleroma-fe#817
No description provided.