Release Snoopy 1.1 with performance and lifecycle fixes - #2
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR prepares the Snoopy screen saver for the 1.1 release by addressing long-running performance/lifecycle problems (especially IdleScene HEIC decoding and stale instance accumulation in wallpaper mode) and improving teardown correctness.
Changes:
- Replaces the old
NSImage-based frame cache with a bounded, cancellableCGImagedecode pipeline running off the main thread (with limited concurrency and prefetch). - Adds session lifecycle coordination to ensure only one active
ScreenSaverViewper display/preview and strengthens teardown/transition cleanup to prevent AVPlayer/CALayer residue. - Bumps
CFBundleShortVersionString/CFBundleVersionto 1.1 (build 2).
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| Sources/SpritePlayer.swift | Introduces FrameDecoder with off-main-thread HEIC thumbnail decoding + bounded cache; updates frame-sequence playback to request/prefetch decoded CGImages and improves cleanup. |
| Sources/ScreenSaverView.swift | Adds per-display active instance coordination and a sessionActive lifecycle; improves transition retention and shutdown cleanup; reduces environment refresh frequency. |
| Info.plist | Updates app version to 1.1 (build 2). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+437
to
445
| private func activationKey() -> String { | ||
| if isPreview { return "preview" } | ||
| let screenNumberKey = NSDeviceDescriptionKey("NSScreenNumber") | ||
| if let number = window?.screen?.deviceDescription[screenNumberKey] as? NSNumber { | ||
| return "screen-\(number.stringValue)" | ||
| } | ||
| return "fullscreen" | ||
| } | ||
| } |
Cyber-Yichen
marked this pull request as ready for review
July 21, 2026 07:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
更新内容
根因
macOS 墙纸宿主可能反复创建屏保视图而未及时回收旧实例,导致播放器和线程持续累积。同时,IdleScene 的 HEIC 序列此前在 Core Animation 提交阶段发生惰性解码,阻塞主线程并重复消耗 CPU。
用户影响
长时间运行时的风扇噪音、能源占用和 IdleScene 掉帧显著降低;屏保停止或被替换时会可靠释放播放器和图层资源。媒体资源仍保持本地,不包含在本仓库中。
验证
.saver构建通过