Repository navigation
jinja : improve context copy constructor performance - #30562
Conversation
Assisted-by: Codex
This comment was marked as resolved.
This comment was marked as resolved.
|
/bot review |
Automated code reviewReview of Blocking findings: none. Correctness verification (looks good):
Will slow the review / worth a look: (point 1) The change silently depends on the implicit copy constructor of Nits: (point 2) (point 3) The comment "// inherit variables (for example, when entering a new scope)" now sits between init-list entries, which reads slightly oddly. Consider moving it to the line above the constructor signature, or leave as-is - minor. Optional follow-up (not for this PR): Style: ASCII only, comments concise, no unrelated changes. Good to merge from my side once (point 1) is considered. This review was generated automatically by pi coding agent using |
Assisted-by: Codex
Assisted-by: Codex
Assisted-by: Codex
Overview
This PR improves the copy constructor performance for the
contextstructure. Instead of repeating the work done in thecontext()constructor and repopulating theenveach time and callingstd::time, we create a new container and copy the shared pointers from the parent env, which is much more efficient.Additional information
This should reduce the cost of this bug fix: #30533
Requirements