Skip to content
This repository was archived by the owner on Jun 24, 2026. It is now read-only.
This repository was archived by the owner on Jun 24, 2026. It is now read-only.

Improve gallery progressive thumbnail loading speed #19

Description

@JonaRichter

Description

Gallery thumbnails load progressively but could be faster. Currently the drain timer processes 1 thumbnail per 0ms tick, and background thread does sequential cv2.imread + cvtColor + resize per image.

Possible improvements

  • Process multiple thumbnails per drain tick (batch drain)
  • Parallelise background imread across multiple threads (thread pool)
  • Decode only the thumbnail resolution for TIFF/JPEG (libtiff/PIL pyramid read)
  • Skip cvtColor on already-RGB images (e.g. PNG loaded via PIL)

Current bottleneck

For a 20-image dataset the background thread reads and resizes all images serially. On slow storage or large TIFFs this makes the last images appear noticeably later than the first.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions