Skip to content

[Due for payment 2026-03-06] [$250] [Performance] Attachments/images load extremely slowly when viewing in the app #81250

Closed

Description

@mountiny

Problem

Attachments and images load very slowly when viewing them in the app, with reports of nearly a minute to load a single low-resolution image even on fast internet connections.

Observations

  • On mobile (iOS), loading a single attachment can take ~1 minute for a low-res image
  • Web loads faster than mobile, but still slower than expected for a responsive application
  • User's internet is fast and everything else loads fine
  • The issue is reproducible and was observed by multiple team members during Onshore

Suspected Cause

The attachment carousel feature may be preloading all images in the chat to enable the < and > navigation arrows. For chats with many attachments, this means:

  1. Opening one image triggers loading of potentially dozens/hundreds of other images
  2. This causes significant delays before the requested image is visible
  3. Large/active chats are disproportionately affected

Expected Behavior

  • The selected attachment should load within 1-2 seconds on a decent internet connection
  • If carousel preloading is needed, it should happen lazily/progressively after the primary image is loaded
  • Adjacent images (prev/next) could be prioritized over distant ones

Reproduction Steps

  1. Open a chat with many attachments/images
  2. Tap on an attachment to view it in the full-screen viewer
  3. Observe the loading spinner duration

Platform

  • iOS (primary report)
  • Android (needs verification)
  • Web (also affected but less severe)

Related Discussion

Slack thread: https://expensify.slack.com/archives/C05LX9D6E07/p1770083248855669

Possible Solutions

  1. Lazy carousel loading: Only preload adjacent images (N-1, N+1) initially, then progressively load others
  2. Show image immediately: Display the requested image first, then load carousel images in background
  3. Thumbnail fallback: Show low-res thumbnails for carousel navigation while full-res images load on demand
  4. Limit preload count: Cap the number of images preloaded for the carousel
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~022018561992008864454
  • Upwork Job ID: 2018561992008864454
  • Last Price Increase: 2026-02-03
  • Automatic offers:
    • abzokhattab | Reviewer | 110396511

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Feb 3, 2026
  2. melvin-bot commented on Feb 3, 2026

    @melvin-bot

    Triggered auto assignment to @laurenreidexpensify (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

  3. added
    InternalRequires API changes or must be handled by Expensify staff
    Hot PickReady for an engineer to pick up and run with
    ExternalAdded to denote the issue can be worked on by a contributor
    and removed
    InternalRequires API changes or must be handled by Expensify staff
    on Feb 3, 2026
  4. changed the title [-][Performance] Attachments/images load extremely slowly when viewing in the app[/-] [+][$250] [Performance] Attachments/images load extremely slowly when viewing in the app[/+] on Feb 3, 2026
  5. melvin-bot commented on Feb 3, 2026

    @melvin-bot
  6. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Feb 3, 2026
  7. 50 remaining items

  8. szymonzalarski98 commented on Feb 24, 2026

    @szymonzalarski98
    Contributor

    Hey, I wanted to finish it yesterday, but encountered some problems with fleaky performance tests. My goal for today is to create this PR

  9. szymonzalarski98 commented on Feb 24, 2026

    @szymonzalarski98
    Contributor

    PR is ready for review #83185

  10. cristipaval commented on Feb 25, 2026

    @cristipaval
    Contributor

    Not overdue, the second PR has been merged

  11. szymonzalarski98 commented on Mar 2, 2026

    @szymonzalarski98
    Contributor

    @mountiny Deployed to prod 3 days ago, I can't see any issues so I think we can close it

  12. cristipaval commented on Mar 2, 2026

    @cristipaval
    Contributor

    I think @abzokhattab has to be paid for the C+ review, no?

  13. abzokhattab commented on Mar 2, 2026

    @abzokhattab
    Contributor

    Correct

  14. added
    Awaiting PaymentAuto-added when associated PR is deployed to production
    and removed on Mar 2, 2026
  15. changed the title [-][$250] [Performance] Attachments/images load extremely slowly when viewing in the app[/-] [+][Due for payment 2026-03-06] [$250] [Performance] Attachments/images load extremely slowly when viewing in the app[/+] on Mar 2, 2026
  16. mountiny commented on Mar 2, 2026

    @mountiny
    ContributorAuthor

    Yeah just waiting for the payment @szymonzalarski98 🙌

  17. laurenreidexpensify commented on Mar 6, 2026

    @laurenreidexpensify
    Contributor

    Payment Summary

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

AutoAssignerNewDotQualityUsed to assign quality issues to engineersAwaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.ExternalAdded to denote the issue can be worked on by a contributorWeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions