Skip to content

[Quality/Performance] Enhance asset restore/refresh #3232

@sync-by-unito

Description

@sync-by-unito

Suggestion

Currently, if a user has over 1,000 assets, it takes approximately 15 minutes to restore or refresh the asset list. This is because, when users refresh or restore their assets:

  • We fetch the complete list of assets.
  • For each asset, we download its thumbnail.

Looking ahead, if we were to have users with 2,000 to 5,000 assets, we need to devise a method for fast and reliable asset refresh or restoration. Given that we serve as a "content wallet," we cannot implement lazy loading like Instagram and similar platforms. However, what if, for restoration or reloading, we fetched only minimal information for each asset (such as nid, proof_hash, updated_at, and blur_hash other fields if needed) instead of the full asset details?

The new restore/refresh mechanism would work as follows:

  • We fetch the full list of assets (only minimal data).
  • We download the thumbnail for each asset only when it becomes visible to the user (for example, if the user is on page 1, we only download thumbnails for the first 10 assets, etc.).

When users restore or refresh their asset list, we display a list of blurred thumbnails and download the actual asset thumbnails only as the user scrolls. This method does not employ lazy loading for the entire asset list but does apply it for asset details as the user scrolls.

We include the "updated_at" information to sort assets by their update date, and we use the blur hash to display a blurred placeholder.

┆Issue is synchronized with this Asana task by Unito
┆Created By: Sam

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions