Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(perf): improve preview loading #11631

Merged
merged 2 commits into from
Sep 25, 2024
Merged

Conversation

JammingBen
Copy link
Collaborator

@JammingBen JammingBen commented Sep 23, 2024

Description

  • Adds a limit of parallel preview requests to prevent the server from being overrun with requests
  • Cancels ongoing and queued preview requests when they are aborted (e.g. when leaving the page while previews are loading)
  • Adds lazy loading for space images
  • Prevents the image resource from being fetched for each space
  • Uses caching for space images

Also introduces a global loadPreview method and removes the visibility observers in each view. Previews are now loaded event-based instead, which should result in a better performance overall.

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests
  • Documentation
  • Maintenance (e.g. dependency updates or tooling)

@JammingBen JammingBen self-assigned this Sep 23, 2024
@JammingBen JammingBen force-pushed the feat/lazy-preview-loading branch 6 times, most recently from f2a6b4d to e2a4ba2 Compare September 24, 2024 12:03
* Adds a limit of parallel preview requests to prevent the server from being overrun with requests
* Cancels ongoing and queued preview requests when they are aborted (e.g. when leaving the page)
* Adds lazy loading for space images
* Prevents the image resource from being fetched for each space
* Uses caching for space images

Also introduces a global `loadPreview` method and removes the visibility observers in each view. Previews are now loaded event-based instead, which should result in a better performance overall.
@JammingBen JammingBen marked this pull request as ready for review September 24, 2024 13:46
Removes this feature as it only adds complexity and very little value.
Copy link

sonarcloud bot commented Sep 25, 2024

Copy link
Member

@kulmann kulmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So awesome 😍

@JammingBen JammingBen merged commit b1b945b into master Sep 25, 2024
3 checks passed
@JammingBen JammingBen deleted the feat/lazy-preview-loading branch September 25, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants