You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by kalyan <re...@gmail.com> on 2013/05/14 15:17:47 UTC

Why is lazyLoadTypeConverters deprecated ?

Hello,

I see that lazyLoadTypeConverters of DefaultCamelContext is deprecated. 

I notice that when this option is enabled by default, it is loading 181
TypeConverters by default. Does this mean 181 classes (including
inner/anonymous classes)

Assuming that this is quite a amount of PermGen space, I have set the
property to false and tried a try run on my code and it seems to work fine
(I don't have any custom Type Converters in code).

Is there any specific reason for doing this ? I ask because it could save
memory and may prove to be useful after all.

Regards,
Kalyan





--
View this message in context: http://camel.465427.n5.nabble.com/Why-is-lazyLoadTypeConverters-deprecated-tp5732492.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Why is lazyLoadTypeConverters deprecated ?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Type converters should be loaded and instantiated as part of booting up Camel.
Doing this lazy just causes problems as you need to sync access to the
converters on first lazy loading and whatnot.

And there is no noticeable memory savings as the .class is on your
classpath and loaded as part of the components they come with.

If you want to save memory then profile your app and see what takes up
/ or what leaks etc.

On Tue, May 14, 2013 at 3:17 PM, kalyan <re...@gmail.com> wrote:
> Hello,
>
> I see that lazyLoadTypeConverters of DefaultCamelContext is deprecated.
>
> I notice that when this option is enabled by default, it is loading 181
> TypeConverters by default. Does this mean 181 classes (including
> inner/anonymous classes)
>
> Assuming that this is quite a amount of PermGen space, I have set the
> property to false and tried a try run on my code and it seems to work fine
> (I don't have any custom Type Converters in code).
>
> Is there any specific reason for doing this ? I ask because it could save
> memory and may prove to be useful after all.
>
> Regards,
> Kalyan
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Why-is-lazyLoadTypeConverters-deprecated-tp5732492.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen