You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Freeman Fang (JIRA)" <ji...@apache.org> on 2011/04/20 10:28:05 UTC

[jira] [Resolved] (SMXCOMP-867) servicemix-camel performance optimizations

     [ https://issues.apache.org/jira/browse/SMXCOMP-867?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Fang resolved SMXCOMP-867.
----------------------------------

    Resolution: Fixed

apply patch on behalf of Jon with thanks
http://svn.apache.org/viewvc?rev=1095319&view=rev

> servicemix-camel performance optimizations
> ------------------------------------------
>
>                 Key: SMXCOMP-867
>                 URL: https://issues.apache.org/jira/browse/SMXCOMP-867
>             Project: ServiceMix Components
>          Issue Type: Improvement
>          Components: servicemix-camel
>         Environment: http://svn.apache.org/repos/asf/servicemix/components/trunk/engines/servicemix-camel
>            Reporter: Jonathan Anstey
>            Assignee: Freeman Fang
>            Priority: Minor
>         Attachments: jbibinding_perf_changes.patch
>
>
> I'm attaching a few small performance optimizations to the JbiBinding in the servicemix-camel component. Nothing Earth shattering here, but there were a few cases where we were doing the same operation twice in a method when only one was required. For example, one particulary bad offender was converting a Camel Message body to a Source object twice:
> {code}
>      public void copyFromCamelToJbi(Message message, NormalizedMessage normalizedMessage) throws MessagingException {
>          if (message != null && message.getBody() != null) {
>             if (message.getBody(Source.class) == null) {
>                  logger.warn("Unable to convert message body of type {} into an XML Source", message.getBody().getClass());
>              } else {
>                  normalizedMessage.setContent(message.getBody(Source.class));
>              }
>          }
> {code}
> Attaching a patch shortly...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira