Skip to content

[ryoku] Bound music backdrop memory to the visible widget - #850

Merged
neur0map merged 1 commit into
Ryoku-dev:unstable-devfrom
googin447-star:perf/music-backdrop-memory
Nov 17, 2026
Merged

neur0map merged 1 commit into
Ryoku-dev:unstable-devfrom
googin447-star:perf/music-backdrop-memory

Conversation

@googin447-star

Copy link
Copy Markdown
Contributor

Note: Fixed: Music widgets use less memory for artwork and local GIFs.

What changed

Describe the change and why it is needed.

Area

How it was tested

Describe how you verified this on a running system, not only that it parses.

Checklist

  • One logical change, with a clear [area] scope: summary commit subject.
  • Matching CHANGELOG.md updated in the area I touched.
  • The git hooks pass locally; I did not use --no-verify.
  • Lua parses (luac -p), shell scripts pass bash -n, and QML passes
    qmllint where applicable.
  • No duplicated config, no dead code, no commented-out code, no em-dash.
  • Docs updated if behavior or layout changed.

Note: Fixed: Music widgets use less memory for artwork and local GIFs.

@neur0map neur0map left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🔍 Review findings — 2 blocking issue(s): see the inline comments and the walkthrough for details.

readonly property bool isVideo: /\.(mp4|webm|mkv|mov|m4v|avi)(\?|$)/.test(root.lc)
readonly property bool isGif: /\.gif(\?|$)/.test(root.lc)

readonly property bool displayed: root.visible && root.hasSource && width > 0 && height > 0

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🟡 minor · Maintainability · fix: low effort

The commit subject lacks the required scope: after [ryoku], so it does not follow the repository's commit format. Amend it to include a scope.

Reply here to discuss, say it's fixed, or explain why it's intended — no mention needed.

Comment on lines +79 to +83
source: root.displayed && root.isGif ? root.srcUrl : ""
sourceSize: root.decodeSize
playing: root.active && visible
cache: true
// Sequential network sources need cached frames to loop.
cache: /^https?:/i.test(root.source)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🟡 minor · Maintainability · fix: low effort

This user-facing memory improvement has no matching area CHANGELOG.md update in the diff. Add a note so users can find the change.

Reply here to discuss, say it's fixed, or explain why it's intended — no mention needed.

@neur0map

Copy link
Copy Markdown
Member

🦊 mika's review

Summary

  • Bound music backdrop decoding to the displayed widget size.
  • Release hidden backdrop sources and reduce image caching.

Estimated review effort: 1/5 · risk: low

📁 Walkthrough details

ryoku/shell/quickshell/shell/modules/desktop/music/MusicBackdrop.qml

  • Gate video loading and image sources on widget visibility and dimensions.
  • Size image and GIF decoding to the widget's device-pixel dimensions.
  • Disable static image caching and retain GIF frame caching only for HTTP sources.
    • Added display and decode-size properties.
    • Unload backdrop sources when the widget is not displayed.
    • Limit image decoding size and adjust caching.

Findings

Severity Category Fix effort File Issue
🟡 minor maintainability low ryoku/shell/quickshell/shell/modules/desktop/music/MusicBackdrop.qml Maintainability — The commit subject lacks the required scope: after [ryoku], so it does not follow the repository's commit format. Amend it to include a scope.
🟡 minor maintainability low ryoku/shell/quickshell/shell/modules/desktop/music/MusicBackdrop.qml Maintainability — This user-facing memory improvement has no matching area CHANGELOG.md update in the diff. Add a note so users can find the change.

⚡ Quick fixes by effort

Low effort (apply from the diff):

  • ryoku/shell/quickshell/shell/modules/desktop/music/MusicBackdrop.qml:23 — Maintainability — The commit subject lacks the required scope: after [ryoku], so it does not follow the repository's commit format. Amend it to include a scope.
  • ryoku/shell/quickshell/shell/modules/desktop/music/MusicBackdrop.qml:79 — Maintainability — This user-facing memory improvement has no matching area CHANGELOG.md update in the diff. Add a note so users can find the change.
🤖 Prompt for AI agents (click, copy, paste into Claude/Codex)
Fix the following issues found by mika-agent on Ryoku-dev/ryoku#850 (branch perf/music-backdrop-memory):

- ryoku/shell/quickshell/shell/modules/desktop/music/MusicBackdrop.qml:23-23 — Maintainability (minor severity, low effort): The commit subject lacks the required `scope:` after `[ryoku]`, so it does not follow the repository's commit format. Amend it to include a scope.
- ryoku/shell/quickshell/shell/modules/desktop/music/MusicBackdrop.qml:79-83 — Maintainability (minor severity, low effort): This user-facing memory improvement has no matching area `CHANGELOG.md` update in the diff. Add a note so users can find the change.

For each: verify it is real in the current code, apply the smallest correct fix, and run the repo's tests. Skip anything already resolved and say why.

🧪 No relevant tests detected in the diff.

🚦 Merge recommendation: needs_review


🦊 Generated by Mika — the Ryoku org's self-hosted AI code reviewer. Machine findings: verify before merging.

@neur0map neur0map added area:ryoku Ryoku project area type:bug A reported problem labels Nov 14, 2026
@neur0map

Copy link
Copy Markdown
Member

Thanks for the work here, this needs to target unstable-dev instead of main

@neur0map
neur0map changed the base branch from main to unstable-dev November 17, 2026 10:08
@neur0map
neur0map merged commit a236745 into Ryoku-dev:unstable-dev Nov 17, 2026
1 of 2 checks passed
@neur0map

Copy link
Copy Markdown
Member

Merged with a small tweak so resizing the widget doesn't restart the gif, thanks for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ryoku Ryoku project area type:bug A reported problem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants