perf(spicetify-splash): leave sooner and snapshot the theme when idle - #47
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. WalkthroughThe dispose path now schedules theme snapshot saving through ChangesTheme snapshot scheduling
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~8 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to Theme snapshots are now saved after idle scheduling rather than during disposal. The inspected replacement paths show no concrete regression, so the change is mergeable on the available evidence, subject to normal checks. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 1 system. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit waits while browsers rest, Comment |
Summary
Splash now leaves sooner once the client is ready, and no longer blocks the main thread as it goes.
--splash-exit-duration, and the README table reflects the new default.getPropertyValueforced a full style recalculation, about 52 ms in a CPU profile of a cold boot. The snapshot now runs inrequestIdleCallback, with a 5 s timeout, falling back tosetTimeoutwhere idle callbacks are unavailable.Bumps spicetify-splash to 0.1.1.
Results
Spotify 1.3.3.264, macOS arm64, 19 modules, using the startup CLI from spicetify/cli#4009 and stdlib from #48. The machine was under heavy unrelated load. The time from all modules loaded to the splash being gone went from about 715 ms (0.1.0, 12 boots) to about 380 ms (this branch, 8 boots).
Splash also delays the client's own boot. In an interleaved A/B (12 boots each), webpack capture came at 692 ms with Splash and 450 ms without. Emulating reduced motion, which turns the animations off, recovered about 90 ms of that. The rest could not be attributed reliably under this load.
Validation
pnpm run checkandoxfmt --checkpass.