wordpress-mobile / wordpress-mobile/WordPress-iOS

Media: Media section looks unresponsive when trying to load a large media library

Open
#14,495 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

[Type] Bug Media
Dominant language
Swift
Stars
3.9k
Forks
1.2k
Avg merge
23h 51m
Merged PRs (30d)
58

Description

When the app is on a slow network connection and/or the site's media library is very large, the Media section loads so slowly that it seems to be unresponsive. (You can end up scrolling through the media library but no media has loaded, making it look blank.)

@frosty shared some observations about the underlying issues:

I think there are probably a number of things at play here that we need to be smarter about (some of them aren’t simple though!). There are a lot of requests going on here at once: the thumbnails when scrolling, and all of the pages for the media library. We currently fetch all of the pages in order, until we’ve fetched all items in the library. This will of course be a lot of requests for a 30k+ library. Ideally we should only load pages as we need them, as the user scrolls – of course, then potential issues arise with gaps and deletions. I also wonder if we could be better at cancelling requests for thumbnails that are no longer required while the user is scrolling.

Internal ref: pbArwn-Lo-p2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by examining the Media section's loading behavior on a slow network with a large library, focusing on the concurrent thumbnail and paginated-library requests described in the issue. The issue does not name files or tests; completion would require an agreed approach that makes loading appear responsive without leaving missing media or unnecessary requests.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, swift
Domain
mobile, performance
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.