Skip to content

Fix/3958 workspace indicator icon perf - #3961

Merged
bbedward merged 5 commits into
duxlabs-dev:masterfrom
PandorasFox:fix/3958-icon-perf
Oct 27, 2026
Merged

bbedward merged 5 commits into
duxlabs-dev:masterfrom
PandorasFox:fix/3958-icon-perf

Conversation

@PandorasFox

Copy link
Copy Markdown
Contributor

Description

This PR cleans up 3 separate issues of the app icon internals:

  • prevents app icon re-creation and re-decoding on every workspace change
  • prefers up-to 256px rasterized icons over larger rasterized icons, or at least the smallest of the very large rasterized icons instead of the largest (the 1024x1024 ghostty png app icon being loaded on my machine was needlessly heavy, and there's not an SVG available)
  • keep workspace indicator pill delegates across workspace changes (prevents app icons from being destroyed and recreated on every workspace change)
  • wait for icon index to be available before showing app icons in workspace indicators. prevents ugly, small, lowest-common-denominators from flashing for a few frames before being replaced with their big, beautiful versions. This is the most optional of all the work here, but I think it generally makes sense to wait for the app icon index to build before we start drawin' em.

With these changes together, the GUI thread no longer stalls for ~70ms on workspace changes (the occasional framedrops on workspace change were noticeable on my 4k60hz monitor).

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Refactor / internal cleanup
  • Documentation
  • Other

Related issues

#3958

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • [n/a] New user-facing strings are wrapped in I18n.tr() with translator context, reusing existing terms where possible
  • [n/a] Go changes: ran make fmt, added/updated tests, make test passes, and go mod tidy is clean
  • QML changes: ran make lint-qml with no new warnings
  • [n/a] I have opened a corresponding pull request in dlx-docs to document any new behaviors: https://github.com/duxlabs-dev/dux-docs

PandorasFox and others added 4 commits October 26, 2026 21:48
Every refresh rebuilt the icon list with new objects, so the identity
compared model recreated every icon delegate on each workspace switch
and decoded the icons again on the gui thread.

Refs duxlabs-dev#3958

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The index always took the largest raster, so apps without an svg in the
theme chain resolved to their 1024px png and every icon load decoded it
in full on the gui thread.

Refs duxlabs-dev#3958

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Only Hyprland wrapped workspace records in stable slots, so on other
compositors a switch replaced the active and previous records, which
recreated both pills and blanked their app icons until they reloaded.
Slots for workspaces that no longer exist are now released.

Refs duxlabs-dev#3958

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Before the theme index publishes, app icons fell back to Qt's icon
lookup, which picked a different size and design, and the switcher only
reloaded them on an unrelated window or workspace change.

Refs duxlabs-dev#3958

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@PandorasFox PandorasFox mentioned this pull request Oct 27, 2026
5 of 9 tasks
@bbedward

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Claude review

One issue: the slot key collides for Aqueous workspaces that share a name.

  • Aqueous string ids fall through to the name key, so workspaces with the same name share one slot and show as the same pill, quickshell/Widgets/WorkspaceSwitcherModel.qml:96
    Checked: slot pooling and pruning across niri/hyprland/mango/i3/aqueous record shapes, recordOf use in WorkspaceSwitcher/WorkspacePager/drag reorder/step, IconThemeService.ready gating (timeout guarantees it flips), raster scoring and its test. Model: claude-opus-5-5.

@bbedward

Copy link
Copy Markdown
Member

/claude review

@claude

claude Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

Claude review

No issues found.
The earlier slot-key collision for Aqueous string ids is fixed by keying on any non-null, non-special id.
Checked: slot keys for every compositor's record shape (niri, hyprland incl. specials and persistent ids, mango, i3/sway/scroll, aqueous, umbriel), slot pruning and reuse, recordOf use across WorkspaceSwitcher/WorkspacePager/drag reorder/step/realWorkspaces, delegate refresh on record and icon-index changes, IconThemeService.ready gating, raster scoring and its test. Model: claude-opus-5-5.

@bbedward
bbedward merged commit b2e1817 into duxlabs-dev:master Oct 27, 2026
2 checks passed
dux-ci Bot pushed a commit that referenced this pull request Oct 27, 2026
port 2.0

(cherry picked from commit b2e1817)
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