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 2023/01/19 00:56:01 UTC

[GitHub] [doris] zhannngchen commented on a diff in pull request #16034: [enhancement](load) avoid schema copy to reduce cpu usage

zhannngchen commented on code in PR #16034:
URL: https://github.com/apache/doris/pull/16034#discussion_r1080711046


##########
be/src/runtime/tablets_channel.cpp:
##########
@@ -242,7 +242,7 @@ Status TabletsChannel::_open_all_writers(const PTabletWriterOpenRequest& request
         wrequest.tuple_desc = _tuple_desc;
         wrequest.slots = index_slots;
         wrequest.is_high_priority = _is_high_priority;
-        wrequest.ptable_schema_param = request.schema();
+        wrequest.table_schema_param = _schema;

Review Comment:
   `_schema` is inited from `request.schema()`, and it's life cycle is longer than delta writers, so we can use `_schema` directly to avoid copying the schema twice(the first time is here, the second time is in the ctor of DeltaWriter)



-- 
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