Skip to Content
avatar image
Former Member

component controller is consuming lots of memory

Hi All,

I have an WebDynpro application and a component controller (MyCompController) too where I have written most of the business specific code. The basis team informed that the component controller (MyCompController) is consuming lots of memory.

Could anybody suggest me how to takle this problem. I dont have any other details and I am new to handle this kind of activity.

Thanks & Regards,

Patana

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • Best Answer
    Jul 07, 2009 at 08:03 AM

    Hi Patana

    Your controller can consume lots of memory because of lots of unnecessary data is loaded in advance and do not used actually. Try to analyze the following points:

    1. Unnecessary data is loaded into the context nodes in advance. Do not load all the data into the context in wdInit() method (do not fill in all the models too). This is not the right way. Instead try to use supply-functions for each context node with data. Supply-function will be called by Webdynpro automatically only when the data is actually required to be shown on UI.

    2. Unnecessary embedded Webdynpro components are created and loaded in memory in advance. Do not create embedded Webdynpro components manually in wdInit() method. Instead try to setup component usages with Create Mode option = OnDemand. Then Webdynpro will create the components automatically when this is really required.

    BR, Sergei

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 07, 2009 at 07:38 AM

    Hi,

    I think you can split your code of Component Controller into multiple CustomControllers (Additional Controllers). Anyway you can exchange the data between Component Controller and other additional custom controllers.

    Regards,

    Charan

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 07, 2009 at 07:43 AM

    Hi Patana,

    In my knowledge you have two ways:

    1. Split your webdynpro component into more than one component.

    2. Make use of Custom controller and reduce the burden from component controller.

    Component controller is consuming more memory because you had put complete functionality there. (Models, business log, model execution, context etc....). Make use of custom controller and divide the code, context to custom controller(s).

    Custom controller also works like component controller only but the only difference is it will not get instantiated till you try to access / call any method / context from the custom controller. Where as component controller will get instantiated as soon as the component instantiates.

    Regards,

    Jaya.

    Add comment
    10|10000 characters needed characters exceeded