[PR #249] [MERGED] Make services process things faster #353

Closed
opened 2026-02-16 01:17:01 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/llama_deploy/pull/249
Author: @logan-markewich
Created: 9/10/2024
Status: Merged
Merged: 9/11/2024
Merged by: @logan-markewich

Base: mainHead: logan/improve_processing_loop


📝 Commits (2)

📊 Changes

1 file changed (+114 additions, -65 deletions)

View changed files

📝 llama_deploy/services/workflow.py (+114 -65)

📄 Description

Currently, the WorkflowService is async, but still processes incoming tasks sequentially

We can greatly improve throughput by taking more advantage of asyncio.create_task for each incoming task

This PR refactors the processing_loop() of the workflow service to be a combination of a task manager and task processor

It can be argued that this should be in the base class, but we haven't cleaned up existing services yet, and I don't want to break them 😅 I could be convinced to do that in this PR though

Fixes https://github.com/run-llama/llama_deploy/issues/42


🔄 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/run-llama/llama_deploy/pull/249 **Author:** [@logan-markewich](https://github.com/logan-markewich) **Created:** 9/10/2024 **Status:** ✅ Merged **Merged:** 9/11/2024 **Merged by:** [@logan-markewich](https://github.com/logan-markewich) **Base:** `main` ← **Head:** `logan/improve_processing_loop` --- ### 📝 Commits (2) - [`23baf19`](https://github.com/run-llama/llama_deploy/commit/23baf196d9575255f9f4bc046738905502a0c95d) Make services process things faster - [`28c0b80`](https://github.com/run-llama/llama_deploy/commit/28c0b804c9fac75679976dd5c43d35a3be2d921b) add docstrings ### 📊 Changes **1 file changed** (+114 additions, -65 deletions) <details> <summary>View changed files</summary> 📝 `llama_deploy/services/workflow.py` (+114 -65) </details> ### 📄 Description Currently, the `WorkflowService` is async, but still processes incoming tasks sequentially We can greatly improve throughput by taking more advantage of `asyncio.create_task` for each incoming task This PR refactors the `processing_loop()` of the workflow service to be a combination of a task manager and task processor It can be argued that this should be in the base class, but we haven't cleaned up existing services yet, and I don't want to break them 😅 I could be convinced to do that in this PR though Fixes https://github.com/run-llama/llama_deploy/issues/42 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 01:17:01 -05:00
yindo closed this issue 2026-02-16 01:17:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/llama_deploy#353