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_r349281414
########## File path: c/src/core/codec.c ########## @@ -364,37 +364,72 @@ static int pn_data_inspect(void *obj, pn_string_t *dst) #define pn_data_hashcode NULL #define pn_data_compare NULL -pn_data_t *pn_data(size_t capacity) +pn_data_t *pni_data(size_t capacity, size_t initial_buffer) Review comment: Could you explain why we don't always lazily allocate `data->buf`? and avoid the extra (and slightly confusing) `pn_data()`. Is there a measured performance impact? If not I'd say always do it lazily. ---------------------------------------------------------------- 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