Skip to content

Use a blurhash for blurred story backgrounds #7133

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hackerbirds
Copy link
Contributor

@hackerbirds hackerbirds commented Jan 16, 2025

Contributor checklist:

  • My contribution is not related to translations.
  • My commits are in nice logical chunks with good commit messages
  • My changes are rebased on the latest main branch
  • A npm run ready run passes successfully (more about tests here)
  • My changes are ready to be shipped to users

Description

Stories render very slowly on some devices. I believe this is due to the use of backdrop-filter: blur(90px) used in the background, which is CPU intensive. This might affect Linux particularly, because nearly all Windows/macOS users would have GPU acceleration, which likely helps render blur faster: https://community.signalusers.org/t/stories-extremely-slow-on-linux-desktop/60588

I have replaced the current CSS background/blur mechanism with a Blurhash, which renders a lot more efficiently, at least on my laptop (I have no good way to show this objectively). On my end, stories now play at full framerate instead of 4-5 FPS thanks to the Blurhash. This does mean the blur effect looks significantly different, overall looking better for images/videos that don't have a uniform background (though that is subjective)

Before (CSS blur)

old-1
old-2

After (blurhash)

new-1
new-2

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