jQWidgets Forums

jQuery UI Widgets Forums Grid Clear Data Adapter

This topic contains 3 replies, has 2 voices, and was last updated by  fredmichel 8 years, 4 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Clear Data Adapter #90339

    fredmichel
    Participant

    Hi,

    I have a question regarding a memory leak we have on a page using a 3 panel Splitter.

    Left panel is the navigation, #Panel1 has a grid with a lot of text data and column with the edit buttons which allows us to visualize each row data in detail.

    The Grid is Loaded in #Panel1 : $(“#Panel1”).load(“Ticket_Queue/Ticket_Queue.php”);

    When we click on the Edit Button it triggers the data in #Panel2

    $(“#Panel2”).load(“Ticket_Viewer/index.php?ticket_id=” + Ticket_ID);

    I am trying to trace the memory leak in IE F12 and I realize there is a bunch of Objects which remains when we switch from the grid to the content back and forth.

    Fist Snap when I open the grid gives me 27.996 Objects. Then I click on Edit to see the data and I have 57.293 Objects with the second Snap. When I go back to the Grid, I would expect to have the same 27.996 Objects…but instead I have 43.114. Its like a bunch of objects remains in the DOM somehow.

    When I check in details, I have a bunch of String identifiers related to the json data I load for both the grid and the content panel.

    I know what I am saying must be confusing…but I am wondering if there is a way to empty a data adapter when we go from 1 page to another before loading the same data again. From what I think I understand in the Profiler, the strings seems to remain in the memory which makes the amount of objects sky-rock everythime we go from 1 page to another.

    Thanks a lot for your help.

    Clear Data Adapter #90347

    Peter Stoev
    Keymaster

    Hi fredmichel,

    Probably, if you delete the adapter’s instance using “delete adapter” for example where adapter is the variable’s name and destroy the Grid.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Clear Data Adapter #90351

    fredmichel
    Participant

    Hi Peter,

    I will try that. Thanks a lot.

    Yet it does seem that Objects from both the Grid in #Panel1 and the other elements from #Panel2 never gets deleted even if we use, remove() empty() or anything else. We seem to have some objects, especially HTML format staying behind. I am using the Text Editor with most of the format options available.

    Clear Data Adapter #90357

    fredmichel
    Participant

    Thanks a lot for your previous reply Peter, the issue did not change, and I got something else when I destroy the grid, which leads me to believe the Memory leak is not related to the Grid at all.

    I have errors in IE Profiler mentionning that an Object is not attached to the DOM. SO when I switch from 1 panel to the other, I have 14.000 Objects with remains in the DOM not attached to anything. And the number keeps on growing until the memory crashes.

    Its almost like the elements From 1 panel remains in the memory even if I use .remove(), .empty() or .destroy()

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.