crud icon indicating copy to clipboard operation
crud copied to clipboard

Optimize tuple deepcopy

Open DifferentialOrange opened this issue 2 years ago • 1 comments

After #268, input tuple is copied so we won't damage the original one. Performance has dropped by 5%.

Raw thoughts on possible optimizations:

  • Skip copying on crud.insert_object().
  • Pass the bucket_id separately to storage and insert it into the tuple on the storage (take care to router/storage rolling code update).

I don't want to change it within this pull request, but rather to think around later.

Originally posted by @Totktonada in https://github.com/tarantool/crud/pull/268#discussion_r852441841

DifferentialOrange avatar Apr 19 '22 07:04 DifferentialOrange

NB: PR #232 also adds tuples copying to safely set bucket_id. I hope we can pass unchanges tuples to storages together with array of bucket_ids. Don't know, whether it'll be profitable, so we should do performance measurements.

See also https://github.com/tarantool/crud/pull/232#discussion_r855289019.

Totktonada avatar Jun 16 '22 17:06 Totktonada