[PR #939] [MERGED] Save some more CPU cycles in the limiter #1151

Closed
opened 2026-02-27 20:01:21 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/librespot-org/librespot/pull/939
Author: @JasonLG1979
Created: 1/15/2022
Status: Merged
Merged: 1/17/2022
Merged by: @roderickvd

Base: devHead: save-some-cpu


📝 Commits (6)

  • 5c066ac Save some more CPU cycles in the limiter
  • c792c92 Clean up and make everything f64
  • 5b38f62 Fix file read.
  • e782d8f Simplify some more and do less redundant math
  • ba7e599 Clarify var names
  • 906b014 condense logic

📊 Changes

3 files changed (+64 additions, -58 deletions)

View changed files

📝 playback/src/config.rs (+1 -1)
📝 playback/src/player.rs (+61 -55)
📝 src/main.rs (+2 -2)

📄 Description

This saves about 5% CPU usage on a Pi Zero and maybe 1-2% on a Pi 4. On anything more powerful than a Pi the diffrence is more than likely imperceivable.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/librespot-org/librespot/pull/939 **Author:** [@JasonLG1979](https://github.com/JasonLG1979) **Created:** 1/15/2022 **Status:** ✅ Merged **Merged:** 1/17/2022 **Merged by:** [@roderickvd](https://github.com/roderickvd) **Base:** `dev` ← **Head:** `save-some-cpu` --- ### 📝 Commits (6) - [`5c066ac`](https://github.com/librespot-org/librespot/commit/5c066ac68675204623e280fe120471ea1005b61d) Save some more CPU cycles in the limiter - [`c792c92`](https://github.com/librespot-org/librespot/commit/c792c920901cb1f67d9fc13758b4ed4d314c338b) Clean up and make everything f64 - [`5b38f62`](https://github.com/librespot-org/librespot/commit/5b38f62d1218ee54760c002bfc504bb6d37cb319) Fix file read. - [`e782d8f`](https://github.com/librespot-org/librespot/commit/e782d8f8839e6225df2e8b7e6db08d349050549c) Simplify some more and do less redundant math - [`ba7e599`](https://github.com/librespot-org/librespot/commit/ba7e599a426785ce4a259ee8bc45931069b9a6c0) Clarify var names - [`906b014`](https://github.com/librespot-org/librespot/commit/906b014cdce7d6c5b0d54aff1431a50bf6be0f30) condense logic ### 📊 Changes **3 files changed** (+64 additions, -58 deletions) <details> <summary>View changed files</summary> 📝 `playback/src/config.rs` (+1 -1) 📝 `playback/src/player.rs` (+61 -55) 📝 `src/main.rs` (+2 -2) </details> ### 📄 Description This saves about 5% CPU usage on a Pi Zero and maybe 1-2% on a Pi 4. On anything more powerful than a Pi the diffrence is more than likely imperceivable. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 20:01:21 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#1151
No description provided.