Skip to Content
author's profile photo Former Member
Former Member

Performance

Hi,

In doModify method of the view controller. I am having declaration of nearlly 60 variable. They are used to access the context nodes , attribute and service calls. So for ever event in the view its going to declare the variables every time. In my case the node will be accessed both in First Time and for every event so we cant put the data declarations inside if( first_time = 'X' ).

So will this hurt the runtime memory if Many users are accessing the application at the same time. Or can i declare attribute for this variables so it get initialized only one and the performance can be improved.

- Rk

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 07:37 AM

    hi rk.....

    either you can do it in wddoinit method or

    if it is only declaration then creat ir as attributes in the context.

    ---regards,

    alex b justin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 07:45 AM

    Hi RK.

    Only declarition istelf won't cost that much I guess. But the question is how you fill them with data and how often you do that.

    If it is like having some data that is set once to control somehing later on you could set static attributes in the assistance class or attributes in the controller attributes tab. So you do not have to access the context.

    But if you work heavily with this attributes in wddomodify you should consider

    if you really need this each rountrip.

    Cheers,

    Sascha

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 05, 2007 at 07:47 AM

    Hi ,

    Use of WDMODIFYVIEW( ) method is to modify the layout .. creating dyanmic UI elements ....not for calling the service methods,why are u accessing the nodes in this method... its should be written in the action methods. or other helper methods...

    see the phase model of

    http://help.sap.com/saphelp_nw04s/helpdata/en/d2/8acd409cc4dd50e10000000a1550b0/content.htm

    regards

    Yash

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 11:30 AM

    Hi,

    If you want to load the data at first, use method WDDOINIT. If you want to change the layout behaviour based on user input on specific field, then do those manipulation in method WDDOMODIFYVIEW. If you want to fetch some data based on user action cerate seperate action method and write the logic in that method. So this methos will be called only if you are doing some actions.

    Reward point if useful.

    Regards,

    Karthick S

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.