Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
distsql: reduce allocations in setupFlow
Previously, the variable `evalCtx *eval.Context` escaped to the heap because it was captured by an `onFlowCleanupEnd` closure in one branch of a conditional and modified in another branch. Go's escape analysis cannot determine that the capture and modification are mutually exclusive, so the pointer is heap allocated. This commit eliminates the allocation by using a new `*eval.Context` variable in the closure that is never modified. Release note: None
- Loading branch information