Skip to content

fix(desktop): disable backdrop-blur on Linux for perf - #3533

Open
JoeJoeflyn wants to merge 1 commit into
block:mainfrom
JoeJoeflyn:fix/linux-backdrop-blur-perf
Open

fix(desktop): disable backdrop-blur on Linux for perf#3533
JoeJoeflyn wants to merge 1 commit into
block:mainfrom
JoeJoeflyn:fix/linux-backdrop-blur-perf

Conversation

@JoeJoeflyn

@JoeJoeflyn JoeJoeflyn commented Jul 29, 2026

Copy link
Copy Markdown

Summary

Linux WebKitGTK has no GPU-accelerated backdrop-filter. With 16+ backdrop-blur layers visible (header, composer, action bars, thread panel), each frame re-blurs all backdrops in software, blocking the main thread — causing sluggish UI and slow loading. Tag <html> with platform-linux at boot and neutralize backdrop-filter on Linux, falling back to the opaque bg-* colors every blur element already carries.

Related issue

Fixes #3328

Testing

Verified on Arch Linux + Hyprland: app was sluggish with 30 messages in #general. After reload with the fix, UI is responsive. macOS/Windows unaffected (no platform-linux class added).

screenrecording-2026-07-29_20-42-51

@JoeJoeflyn
JoeJoeflyn requested a review from a team as a code owner July 29, 2026 13:47
@JoeJoeflyn
JoeJoeflyn force-pushed the fix/linux-backdrop-blur-perf branch from 35fa4a3 to cc1c867 Compare July 29, 2026 13:48

@Chessing234 Chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reasonable Linux perf trade. WebKitGTK really does software-composite backdrop-filter, and tagging html.platform-linux at boot is a low-risk switch. Two notes:

  1. navigator.platform is deprecated and can be spoofed; navigator.userAgentData?.platform (or Tauri's OS API) would be more durable long-term, but fine for v1.
  2. The * { backdrop-filter: none !important } hammer is broad — confirm glass panels that relied on blur still have an opaque bg-* behind them so they don't go translucent. The PR description says they do; if you've spot-checked the thread panel + composer on Arch, I'm good.

Linux WebKitGTK has no GPU-accelerated backdrop-filter path. With 16+
backdrop-blur layers visible, each frame re-blurs all backdrops in
software, blocking the main thread — causing sluggish UI and slow
loading. Tag <html> with platform-linux class and neutralize
backdrop-filter on Linux, falling back to the opaque bg-* colors every
blur element already carries.

Signed-off-by: JoeJoeflyn <thaitainguyen336@gmail.com>
@JoeJoeflyn
JoeJoeflyn force-pushed the fix/linux-backdrop-blur-perf branch from 8ee8782 to ab6b668 Compare July 30, 2026 04:43
@JoeJoeflyn

Copy link
Copy Markdown
Author

Thanks for the review! Reused isLinuxPlatform() for #1. For #2, all glass panels have opaque fallbacks, checked on Arch, looks fine.

@JoeJoeflyn
JoeJoeflyn requested a review from Chessing234 August 5, 2026 08:57

@Chessing234 Chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

rechecked tip — still the right linux trade. most chrome already carries opaque bg-*, and ComposerDockBackdrop is frost-only so killing blur just makes it a no-op there. fine by me.

@JoeJoeflyn

Copy link
Copy Markdown
Author

tks, appreciate it

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.

Slow UI performance on linux

2 participants