crud
crud copied to clipboard
Optimize tuple deepcopy
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
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.