astitcher commented on a change in pull request #213: PROTON-2140: Lazy creation of various link related objects URL: https://github.com/apache/qpid-proton/pull/213#discussion_r349287537
########## File path: c/src/core/codec.c ########## @@ -431,6 +466,9 @@ static int pni_data_grow(pn_data_t *data) static ssize_t pni_data_intern(pn_data_t *data, const char *start, size_t size) { + if (data->buf == NULL) { + data->buf = pn_buffer(0); Review comment: I don't understand why the initial buffer size is 0 here when we know we are going to be using the buffer to store something. We know that the size of the data being interned is `size` so we should start with this size (or larger to allow for some growth). ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org