You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Christian Müller <ch...@gmail.com> on 2013/04/01 13:32:39 UTC

Re: Performance puzzle. Slow splitter on object array?

To be honest, I don't understand how your body gets splitted... The body
which your splitter receives is the GernericPayload object, right?

Best,
Christian


On Tue, Mar 26, 2013 at 10:58 PM, MarkD <ma...@googlemail.com>wrote:

> Of course, i'll paste the entire route:
>
>
> <route id="udpBroadcastReceive">
>         <from
>
> uri="netty:{{broadcastTmProtocol}}://{{broadcastTmHost}}:{{broadcastTmPort}}?receiveBufferSizePredictor=65536&amp;decoders=#broadcastDecoder&amp;sync=false"
> />
>         <split parallelProcessing="true" streaming="true">
>                 <simple>${body}</simple>
>                 <to uri="bean:payloadCodec?method=decode(GenericPayload)"/>
>                 <multicast parallelProcessing="true" streaming="true">
>                         <to uri="activemq-vm:topic:parameterGroupsOut" />
>                         <to uri="activemq-vm:topic:parameterGroupsUnsplit"
> />
>                 </multicast>
>         </split>
> </route>
>
>
> You'll notice this is slightly different to the hawtio diagram. The from
> seda:udp endpoint which started the route in the image was a product of us
> making sure it wasn't the netty endpoint/codec causing the bottleneck. It
> wasn't so we put the route back to the one pasted above.
> The parallelProcessing and streaming options were adding just in case. The
> website says they are false by default but the xsd claims they are true :)
>
> As you can see it's literally a simple expression on the in body.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Performance-puzzle-Slow-splitter-on-object-array-tp5729867p5729873.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

Re: Performance puzzle. Slow splitter on object array?

Posted by prem5038 <pr...@gmail.com>.
I am also having this issue with Camel Splitter. I am using Splitter to split
a List<LinkedHashMap&lt;String,Object>> and direct to another route which
would write to file. I found that splitter is taking 7-8 seconds to split
each item in the List.
<route>
	<from uri="timer://kickoff?repeatCount=1" />
	<setBody>
	        <simple>select * from emp</simple>
	</setBody>
		<to uri="jdbc:testdb" />
		<split streaming="true"> 
			<method ref="XMLTransformer" method="splitBody" />
			<bean ref="XMLTransformer" method="receive" />
		</split>						
</route>

The method split body returns LinkedHashMap<String,Object>. When I manually
split the messages by iterating through the list. It is much faster. Why
splitter is very slow while iterating collection? Are there any work around
available for this issue? Please help.



--
View this message in context: http://camel.465427.n5.nabble.com/Performance-puzzle-Slow-splitter-on-object-array-tp5729867p5769761.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Performance puzzle. Slow splitter on object array?

Posted by srinivas_vsk <sr...@yahoo.com>.
Have you been able to resolve the slowness, im noticing similar issue
splitting a List<CustomObject>,  Hawtio shows couple of seconds to split
Thanks



--
View this message in context: http://camel.465427.n5.nabble.com/Performance-puzzle-Slow-splitter-on-object-array-tp5729867p5756978.html
Sent from the Camel - Users mailing list archive at Nabble.com.