[PR #161] [MERGED] Improve performance by not locking the database #185

Closed
opened 2026-02-27 10:16:05 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/matze/wastebin/pull/161
Author: @matze
Created: 5/17/2025
Status: Merged
Merged: 5/18/2025
Merged by: @matze

Base: masterHead: improve-perf


📝 Commits (1)

  • f937cfd Improve performance by not locking the database

📊 Changes

9 files changed (+624 additions, -147 deletions)

View changed files

📝 CHANGELOG.md (+3 -1)
📝 Cargo.lock (+333 -35)
📝 crates/wastebin_core/Cargo.toml (+1 -1)
📝 crates/wastebin_core/src/db.rs (+268 -103)
📝 crates/wastebin_ctl/Cargo.toml (+1 -0)
📝 crates/wastebin_ctl/src/main.rs (+6 -4)
📝 crates/wastebin_server/Cargo.toml (+2 -0)
📝 crates/wastebin_server/src/main.rs (+7 -2)
📝 crates/wastebin_server/src/test_helpers.rs (+3 -1)

📄 Description

Use a dedicated database handler thread that reads database commands from a kanal channel and return results on a oneshot channel. On an aging Ryzen 7 3700X, this improves throughput from 28k to 43k requests per seconds as measured using the https://github.com/mokurin000/wastebin-bench tool.


🔄 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/matze/wastebin/pull/161 **Author:** [@matze](https://github.com/matze) **Created:** 5/17/2025 **Status:** ✅ Merged **Merged:** 5/18/2025 **Merged by:** [@matze](https://github.com/matze) **Base:** `master` ← **Head:** `improve-perf` --- ### 📝 Commits (1) - [`f937cfd`](https://github.com/matze/wastebin/commit/f937cfd4eb9685e53d6fde5614bd4582bd148e91) Improve performance by not locking the database ### 📊 Changes **9 files changed** (+624 additions, -147 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+3 -1) 📝 `Cargo.lock` (+333 -35) 📝 `crates/wastebin_core/Cargo.toml` (+1 -1) 📝 `crates/wastebin_core/src/db.rs` (+268 -103) 📝 `crates/wastebin_ctl/Cargo.toml` (+1 -0) 📝 `crates/wastebin_ctl/src/main.rs` (+6 -4) 📝 `crates/wastebin_server/Cargo.toml` (+2 -0) 📝 `crates/wastebin_server/src/main.rs` (+7 -2) 📝 `crates/wastebin_server/src/test_helpers.rs` (+3 -1) </details> ### 📄 Description Use a dedicated database handler thread that reads database commands from a kanal channel and return results on a oneshot channel. On an aging Ryzen 7 3700X, this improves throughput from 28k to 43k requests per seconds as measured using the https://github.com/mokurin000/wastebin-bench tool. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-27 10:16:05 +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/wastebin-matze#185
No description provided.