[ https://issues.apache.org/jira/browse/DISPATCH-1354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16858842#comment-16858842 ]
ASF GitHub Bot commented on DISPATCH-1354: ------------------------------------------ kgiusti commented on pull request #518: DISPATCH-1354: Annotation processing performance improvements URL: https://github.com/apache/qpid-dispatch/pull/518#discussion_r291679091 ########## File path: src/parse.c ########## @@ -722,61 +722,123 @@ const char *qd_parse_annotations_v1( return parse_error; } + // define a shorthand name for the qd message annotation key prefix length +#define QMPL QD_MA_PREFIX_LEN + +#define MIN(a,b) (((a)<(b))?(a):(b)) Review comment: ooh! Please put this (and maybe MAX) into ctools.h - don't know how many times I've ended up doing this exact same thing. ---------------------------------------------------------------- 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 > Interrouter annotation processing uses slow methods > --------------------------------------------------- > > Key: DISPATCH-1354 > URL: https://issues.apache.org/jira/browse/DISPATCH-1354 > Project: Qpid Dispatch > Issue Type: Improvement > Components: Router Node > Affects Versions: 1.7.0 > Reporter: Chuck Rolke > Assignee: Chuck Rolke > Priority: Major > > Message annotation processing on received messages stages key names byte by > byte into a flat buffer and then uses strcmp to check them. > Easy improvements are: > * Use name in raw buffer if it does not cross a buffer boundary > * If name crosses a boundary then use memmoves to get the name in chunks > * Check the name prefix only once and then check variable parts of name > strings > * Don't create unnecessary qd_iterators and qd_parsed_fields > * Don't check names whose lengths differ from the given keys -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org