Skip to content

UX: Optimize thumbnail rendering performance in result views #4985

Description

@lastzero

As a user, I want to see the best matching thumbnail in the search results with as little overhead as possible, so I can scroll quickly and the results are displayed correctly.

Instead of depending on two other functions, the thumbnailUrl() function in frontend/src/model/photo.js should be simplified, which should also improve rendering performance. It is used to generate the thumbnail URL in the search result views and is therefore called very often, e.g. when scrolling through results.

Current Implementation:

thumbnailUrl(size) {
  return this.generateThumbnailUrl(
    this.primaryFileHash(),
    this.videoFile(),
    $config.staticUri,
    $config.contentUri,
    $config.previewToken,
    size
  );
}

New Implementation:

thumbnailUrl(size) {
  return this.generateThumbnailUrl(
    this.fileHash(),
    $config.staticUri,
    $config.contentUri,
    $config.previewToken,
    size
  );
}

Metadata

Metadata

Labels

frontendRequires experience with HTML/JS/CSSperformancePerformance OptimizationreleasedAvailable in a stable releasetestedChanges have been tested successfullyuxImpacts User Experience

Type

Fields

No fields configured for Task.

Projects

Status
Release 🌈

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions