Skip to content

Image loading still slow (avatars / room / space) — profile the media pipeline #243

Description

@Deniel9204

Avatar / room / space image loading is noticeably faster after #240 and #242 (which removed the uncached push-rule scan and cache the per-room unread state), but it's still far from where it should be — images still take longer than expected to appear.

The unread computation is no longer the bottleneck, so the remaining cost is most likely in the image pipeline itself:

  • MatrixMxcImage / MxcImageProvider resolution + decode,
  • the Drift file cache (DriftFileCache) read/write path used for cached media,
  • and/or thumbnail sizing (rooms request thumbnailHeight: 64, fullResHeight: 128).

Next steps

  • Profile a cold and warm scroll through a space/room list with the Flutter performance overlay / DevTools timeline to see where the time goes (UI thread vs. raster vs. IO isolate vs. network).
  • Check whether thumbnails are being decoded at full resolution and downscaled (expensive) vs. requesting correctly-sized thumbnails from the homeserver.
  • Check the file-cache hit path — confirm cached images aren't re-fetched/re-decoded on every list rebuild.

Reported on macOS (Apple Silicon); likely platform-independent.

Follow-up to the unread-indicator performance regression (#76 / #240 / #242).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions