Uh oh!
There was an error while loading. Please reload this page.
[improvement](bitmap) Use shared_ptr in BitmapValue to avoid deep copying - #19101
Conversation
mrhhsg
commented
Apr 26, 2023
run buildall |
| BitmapValue& operator=(const BitmapValue& other) { | ||
| _type = other._type; | ||
| _sv = other._sv; | ||
| _bitmap = other._bitmap; | ||
| return *this; | ||
| } |
There was a problem hiding this comment.
warning: use '= default' to define a trivial copy-assignment operator [modernize-use-equals-default]
| BitmapValue&operator=(constBitmapValue&other) { | |
| _type=other._type; | |
| _sv=other._sv; | |
| _bitmap=other._bitmap; | |
| return*this; | |
| } | |
| BitmapValue&operator=(constBitmapValue&other) =default; |
mrhhsg
commented
Apr 26, 2023
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
TeamCity pipeline, clickbench performance test result: |
mrhhsg
commented
Apr 28, 2023
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
mrhhsg
commented
Apr 28, 2023
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
mrhhsg
commented
May 4, 2023
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
mrhhsg
commented
May 4, 2023
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
| return; | ||
| } | ||
| if (_bitmap.use_count() > 1) { |
There was a problem hiding this comment.
感觉这里用use count 可能不太好,不如记录一个标记位,比如is_owner 这样的,然后再copy constructor 还有operator=的时候,都把is_owner 设置为false;prepare for write的时候,设置为true。
There was a problem hiding this comment.
如果is owner == true,就直接return了。 我觉得一个bool 的判断效率要比 shared ptr use count 高
mrhhsg
commented
May 22, 2023
run buildall |
clang-tidy review says "All clean, LGTM! 👍" |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
hello-stephen
commented
May 22, 2023
TeamCity pipeline, clickbench performance test result: |
clang-tidy review says "All clean, LGTM! 👍" |
mrhhsg
commented
May 22, 2023
run buildall |
hello-stephen
commented
May 22, 2023
TeamCity pipeline, clickbench performance test result: |
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
…ying (apache#19101) Currently bitmapvalue type is copied between columns, it cost a lot of memory. Use a shared ptr in bitmap value to avoid copy data.
…ying (apache#19101) (apache#21271) Currently bitmapvalue type is copied between columns, it cost a lot of memory. Use a shared ptr in bitmap value to avoid copy data.
Proposed changes
Currently bitmapvalue type is copied between columns, it cost a lot of memory. Use a shared ptr in bitmap value to avoid copy data.
Problem summary
Describe your changes.
Checklist(Required)
Further comments
If this is a relatively large or complex change, kick off the discussion at dev@doris.apache.org by explaining why you chose the solution you did and what alternatives you considered, etc...