Optimize calls to maybe_signature in canvas
Author: naomielstCreated Nov 16, 2021Updated Sep 10, 2026
LabelsIssue Type: EnhancementComponent: Canvas
Checklist
- I have checked the issues list for similar or identical enhancement to an existing feature.
- I have checked the pull requests list for existing proposed enhancements.
- I have checked the commit log to find out if the if the same enhancement was already implemented in the master branch.
- I have included all related issues and possible duplicate issues in this issue (If there are none, check this box anyway).
Related Issues and Possible Duplicates
Related Issues
- None
Possible Duplicates
- None
Brief Summary
In canvas.py, there are some calls to maybe_signature which are followed by .clone(): here and here.
These can be optimized by calling maybe_signature with the function param clone set to True, and not calling clone() after the function call.
Design
Architectural Considerations
None
Proposed Behavior
maybe_signature(...).clone() --> maybe_signature(..., clone=True)
Proposed UI/UX
Diagrams
N/A
Alternatives
None
Source: celery/celery