tarantool / tarantool/crud

Optimize tuple deepcopy

Open
#274 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

performance
Dominant language
Lua
Stars
43
Forks
17
Avg merge
28m
Merged PRs (30d)
2

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the tuple-copying change from #268 and the crud.insert_object() path, then trace how the tuple moves through router and storage. Review the storage and router rolling-code update concerns before choosing an optimization. Done means reducing the reported 5% performance loss without modifying the original input tuple or breaking storage behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
database, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.