-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Copy link
Labels
CAMEL 2.0P1Task with middle level priorityTask with middle level priorityenhancementNew feature or requestNew feature or request
Milestone
Description
Required prerequisites
- I have searched the Issue Tracker and Discussions that this hasn't already been reported. (+1 or comment there if it has.)
- Consider asking first in a Discussion.
Motivation
The TaskChannel
class in task_channel.py
currently uses a simple dictionary (_task_dict: Dict[str, Packet]
) for task storage, leading to O(n) complexity for task retrieval.
Tasks:
- Replace
_task_dict
with hybrid data structure:- Hash map for O(1) lookup by task ID
- Status-based indexes for efficient filtering
- Optimize
get_assigned_task_by_assignee
:- Maintain assignee->tasks index for O(1) lookup
- Remove need for linear search
- Improve concurrency:
- Use read-write locks for better concurrent access
- Implement fine-grained locking per assignee
- Add batched operations to reduce lock acquisitions
Solution
No response
Alternatives
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
CAMEL 2.0P1Task with middle level priorityTask with middle level priorityenhancementNew feature or requestNew feature or request
Type
Projects
Status
No status