client-rust icon indicating copy to clipboard operation
client-rust copied to clipboard

Proposal: pass Mutation and RegionStore by Arc pointer

Open Little-Wallace opened this issue 4 years ago • 0 comments

Problem

Client-rust costs a lot of CPU to copy the structure. And most of this copy and allocation is to copy mutation between TransactionClient and kinds of PlanBuilder.

Solution

I think we can store these Mutation and RegionStore of RegionCache as an Arc Pointer. We only need to clone them before we really call gRPC API to send requests.

Little-Wallace avatar Nov 13 '21 16:11 Little-Wallace