[PR #52] [MERGED] Improve performance when there's a single queue #570

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

📋 Pull Request Information

Original PR: https://github.com/hibiken/asynq/pull/52
Author: @hibiken
Created: 1/15/2020
Status: Merged
Merged: 1/15/2020
Merged by: @hibiken

Base: masterHead: performance/singlequeue


📝 Commits (2)

  • ceac54b [performance] Use BRPOPLPUSH if one queue is used
  • 8fd4e66 [performance] Skip the overhead of json decoding when scheduling to one

📊 Changes

6 files changed (+78 additions, -17 deletions)

View changed files

📝 background.go (+4 -2)
📝 internal/rdb/rdb.go (+44 -9)
📝 internal/rdb/rdb_test.go (+6 -1)
📝 processor.go (+13 -2)
📝 scheduler.go (+10 -2)
📝 scheduler_test.go (+1 -1)

📄 Description

On my machine:

Before => After
BenchmarkEndToEnd-8: 36631617793 ns/op => 25590901414 ns/op
BenchmarkEndToEndSimple-8: 11332458455 ns/op => 9290852173 ns/op


🔄 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/hibiken/asynq/pull/52 **Author:** [@hibiken](https://github.com/hibiken) **Created:** 1/15/2020 **Status:** ✅ Merged **Merged:** 1/15/2020 **Merged by:** [@hibiken](https://github.com/hibiken) **Base:** `master` ← **Head:** `performance/singlequeue` --- ### 📝 Commits (2) - [`ceac54b`](https://github.com/hibiken/asynq/commit/ceac54b483b6183c7503ec12756185035be92ce3) [performance] Use BRPOPLPUSH if one queue is used - [`8fd4e66`](https://github.com/hibiken/asynq/commit/8fd4e66514fa100d1866ec0f45ac0353288f72a8) [performance] Skip the overhead of json decoding when scheduling to one ### 📊 Changes **6 files changed** (+78 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `background.go` (+4 -2) 📝 `internal/rdb/rdb.go` (+44 -9) 📝 `internal/rdb/rdb_test.go` (+6 -1) 📝 `processor.go` (+13 -2) 📝 `scheduler.go` (+10 -2) 📝 `scheduler_test.go` (+1 -1) </details> ### 📄 Description On my machine: Before => After *BenchmarkEndToEnd-8*: 36631617793 ns/op => 25590901414 ns/op *BenchmarkEndToEndSimple-8*: 11332458455 ns/op => 9290852173 ns/op --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 05:54: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/asynq#570
No description provided.