You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/01/24 05:41:09 UTC
[GitHub] [incubator-doris] zuochunwei opened a new pull request #7855: (optimization)(vectorized) improving Column inserter
zuochunwei opened a new pull request #7855:
URL: https://github.com/apache/incubator-doris/pull/7855
# Proposed changes
1. reduce function call times
2. reduce check capacity for insert_data()
Issue Number: close #xxx
## Problem Summary:
Describe the overview of changes.
## Checklist(Required)
1. Does it affect the original behavior: (Yes/No/I Don't know)
2. Has unit tests been added: (Yes/No/No Need)
3. Has document been added or modified: (Yes/No/No Need)
4. Does it need to update dependencies: (Yes/No)
5. Are there any changes that cannot be rolled back: (Yes/No)
## Further comments
If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] wangbo merged pull request #7855: [improvement](storage) improving Column inserter
Posted by GitBox <gi...@apache.org>.
wangbo merged pull request #7855:
URL: https://github.com/apache/incubator-doris/pull/7855
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] zuochunwei commented on a change in pull request #7855: (optimization)(vectorized) improving Column inserter
Posted by GitBox <gi...@apache.org>.
zuochunwei commented on a change in pull request #7855:
URL: https://github.com/apache/incubator-doris/pull/7855#discussion_r790575780
##########
File path: be/src/vec/columns/column_vector.h
##########
@@ -120,10 +120,13 @@ class ColumnVector final : public COWHelper<ColumnVectorHelper, ColumnVector<T>>
ColumnVector(std::initializer_list<T> il) : data {il} {}
void insert_res_column(const uint16_t* sel, size_t sel_size, vectorized::ColumnVector<T>* res_ptr) {
+ auto& res_data = res_ptr->data;
+ res_data.reserve(res_ptr->size() + sel_size);
Review comment:
because i will insert sel_size elements into res_ptr's data
the operation of reserve will supply enough memory for assigning one by one in the loop.
each insert_data() call will check whether need to alloc bigger memory chunk in push_back(), that's not highly efficient.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] wangbo commented on a change in pull request #7855: (optimization)(vectorized) improving Column inserter
Posted by GitBox <gi...@apache.org>.
wangbo commented on a change in pull request #7855:
URL: https://github.com/apache/incubator-doris/pull/7855#discussion_r791325529
##########
File path: be/src/vec/columns/column_vector.h
##########
@@ -120,10 +120,13 @@ class ColumnVector final : public COWHelper<ColumnVectorHelper, ColumnVector<T>>
ColumnVector(std::initializer_list<T> il) : data {il} {}
void insert_res_column(const uint16_t* sel, size_t sel_size, vectorized::ColumnVector<T>* res_ptr) {
+ auto& res_data = res_ptr->data;
+ res_data.reserve(res_ptr->size() + sel_size);
Review comment:
```suggestion
res_data.reserve(sel_size);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] wangbo commented on a change in pull request #7855: (optimization)(vectorized) improving Column inserter
Posted by GitBox <gi...@apache.org>.
wangbo commented on a change in pull request #7855:
URL: https://github.com/apache/incubator-doris/pull/7855#discussion_r790435073
##########
File path: be/src/vec/columns/column_vector.h
##########
@@ -120,10 +120,13 @@ class ColumnVector final : public COWHelper<ColumnVectorHelper, ColumnVector<T>>
ColumnVector(std::initializer_list<T> il) : data {il} {}
void insert_res_column(const uint16_t* sel, size_t sel_size, vectorized::ColumnVector<T>* res_ptr) {
+ auto& res_data = res_ptr->data;
+ res_data.reserve(res_ptr->size() + sel_size);
Review comment:
why ```+ sel_size``` here?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] github-actions[bot] commented on pull request #7855: (optimization)(vectorized) improving Column inserter
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7855:
URL: https://github.com/apache/incubator-doris/pull/7855#issuecomment-1022116236
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] wangbo commented on a change in pull request #7855: (optimization)(vectorized) improving Column inserter
Posted by GitBox <gi...@apache.org>.
wangbo commented on a change in pull request #7855:
URL: https://github.com/apache/incubator-doris/pull/7855#discussion_r792308864
##########
File path: be/src/vec/columns/column_vector.h
##########
@@ -120,10 +120,13 @@ class ColumnVector final : public COWHelper<ColumnVectorHelper, ColumnVector<T>>
ColumnVector(std::initializer_list<T> il) : data {il} {}
void insert_res_column(const uint16_t* sel, size_t sel_size, vectorized::ColumnVector<T>* res_ptr) {
+ auto& res_data = res_ptr->data;
+ res_data.reserve(res_ptr->size() + sel_size);
Review comment:
```suggestion
res_data.reserve(sel_size);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org
[GitHub] [incubator-doris] wangbo commented on a change in pull request #7855: (optimization)(vectorized) improving Column inserter
Posted by GitBox <gi...@apache.org>.
wangbo commented on a change in pull request #7855:
URL: https://github.com/apache/incubator-doris/pull/7855#discussion_r791325529
##########
File path: be/src/vec/columns/column_vector.h
##########
@@ -120,10 +120,13 @@ class ColumnVector final : public COWHelper<ColumnVectorHelper, ColumnVector<T>>
ColumnVector(std::initializer_list<T> il) : data {il} {}
void insert_res_column(const uint16_t* sel, size_t sel_size, vectorized::ColumnVector<T>* res_ptr) {
+ auto& res_data = res_ptr->data;
+ res_data.reserve(res_ptr->size() + sel_size);
Review comment:
```suggestion
res_data.reserve(sel_size);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org