Skip to Content
avatar image
Former Member

Interactive UI Elements are not destroyed implicitly by the framework

Hello Friends

My team has figured out that the interactive UI elements in Web dynpro are not getting destroyed by the framework or JVM so they are getting piled up and are becoming a serious performance issue , I wanted everyone's opinion on that and some way to destroy those elements explicitly

IF some solution is given which does not require much of hard coding then it would be better

Thanks a lot

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Feb 03, 2009 at 10:15 AM

    Hi,

    I am not sure of the Web Dynpro UI Elements are preserved in memory even after the view is terminated.

    Eitherways - in order to eliminate the elements - they are actually instances of the Web Dynpro Framework classes (i.e. objects) - you need to set each of the elements to "null" in the wddoexit() method of your view, or controller (as your design permits).

    However, to get access to the elements at runtime - you need access to the view that is currently on the screen - this can (as far as i know) be done only in the modifyview() method.

    The "view" parameter of this method is the reference to the current view displayed on the screen.

    You can use a combination of calls from a custom method that you've written to call modify and exit methods and write code to eliminate the unwanted instances of elements using view.getElement(elementID) and type casting it to a desired type or supertype.

    However, I do suggest that you determine that the problem is being caused by the ui element instances and not by an overloaded server.

    p256960.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Feb 03, 2009 at 10:24 PM

    Hi Smriti,

    Are you using the recommended JDK version for your version of the server? The version of JDK used will have an impact on garbage collection of UI elements. There are other ways in which UI elements still have reference to active applications.

    Check in your webdynpro application that you are not passing any UI Elements or the View itself to other java classes or applications for processing. If you are passing the view or UI elements to other application which might still be active on the server, those applications could still have reference the UI elements and hence not garbage collcted.

    Make sure that you are not storing any UI elements or the View itself in any public variables.

    Webdynpro applications can me made suspendable. That means if the applications finishes its job it will go to suspend more than exit. A suspendable webdynpro application will hold on to its UI resources. See this document. [https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/102ed591-62a6-2910-94ac-e6038ef7b76e]. make sure you webdynpro applications are not made suspendable.

    Sanyev

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Smriti,

      Memory problems usually require extensive code analysis for identification of the problem. So if you can achieve results with simple code change then that is better. I am not aware of any tool which can solve webdynpro memory issues. There are some profiling tools which can help analyze problems like jprofiler.

      Regards,

      Sanyev

  • avatar image
    Former Member
    Feb 04, 2009 at 04:40 AM

    Please have a look at the thread given below

    destroying-dynamically-created-ui-elements

    Add comment
    10|10000 characters needed characters exceeded