Memory Leak in IE and Firefox

Memory Leak in IE and Firefox

knetadminknetadmin Posts: 47Questions: 1Answers: 0
edited April 2015 in Priority support

after using :
DTInstances.getLast().then(function (dtInstance) {
dtInstance.DataTable.rows().invalidate().draw(false);
});
to apply sort, IE and Firefox crash after period of time and when checking memory for IE and Firefox, memory increasing

please, check the following URLs for images contain memory progress in ie :

http://54.191.119.153:8080/static/ie-21.png
http://54.191.119.153:8080/static/ie-22.png

«1

Replies

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Hi,

    Are you using the latest version of FixedColumns (per the discussion in your other thread) when doing this test? The current release will unfortunately have a memory leak as it isn't releasing all of its event handlers.

    Regards,
    Allan

  • knetadminknetadmin Posts: 47Questions: 1Answers: 0

    i am testing on fixedColumns v3.0.4 and before that and now testing in fixedColumns v3.0.5 all have the same issue
    please, i need to know which release contain the fix of this issue and when????

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    If the latest FixedColumns didn't fix the issue, this is unfortunately likely to be quite difficult to debug. I will get back to you when I have more information.

    Regards,
    Allan

  • knetadminknetadmin Posts: 47Questions: 1Answers: 0

    please, i need to fix this issue my app force close in Firefox and IE
    i have updates every 2000 update per second
    this issue not acceptable for my environment

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    2000 updates per second?! That's a lot!

    I'm still looking into what is causing this issue I'm afraid. However, with that many updates per second, the workaround we came up with in one of your other threads to invalidate the whole table on each update is not a good one. I will also need to spend some time looking into your code to suggest a more efficient way of doing it.

    I'll reply back when I have more information.

    Allan

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Another update - I'm quite certain that the issue is in FixedColumns and I'm reasonably sure that it is to do with how FixedColumns is cloning the header cells from the original DataTable for display in the fixed columns. It will copy all of the header cells, but not all are displayed, which means they don't have their event handlers removed when they are destroyed.

    How exactly to correct that is something I am still working on.

    Regards,
    Allan

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    I've just committed a couple of fixes for memory leaks in FixedColumns that should address the leak you are seeing here. Could you try using the nightly version of FixedColumns please? The build date is "23rd Apr 2015, 15:34".

    Thanks,
    Allan

  • knetadminknetadmin Posts: 47Questions: 1Answers: 0

    Thanks for reply
    i admit memory leaks reduced but still exist memory leaks
    my memory leaks test : http://54.191.119.153:8080/static/performance.png

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Could you possibly update your static/grid.html page with the latest code and I'll take a further look into what is happening.

    Memory is always difficult!

    Thanks,
    Allan

  • knetadminknetadmin Posts: 47Questions: 1Answers: 0
  • knetadminknetadmin Posts: 47Questions: 1Answers: 0
    edited April 2015

    I have big another Big issue when hide same columns and reorder columns they back all to show columns can you test it in http://54.191.119.153:8080/static/grid.html just try to reorder with column with auto sort

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Thanks for the update.

    It would appear that there are three areas in the FixedColumns code where events are being cloned from the source DataTable (for example the click to sort on column header event) which are not being removed when the table is being fully redrawn each time. I will continue to look into this and let you know how I get on.

    Regarding the column reordering issue - I suspect that at least part of the issue will be with the rapid updating of the data. Unfortunately the support credits have run out now so I won't be able to look into this immediately (I'm actually not sure that there is a possible fix for this one), but I will continue to look into the memory issue as priority support and hopefully get back to you soon.

    Regards,
    Allan

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Hi,

    I've just committed an update for FixedColumns that corrects the memory issue that can be seen in your demo. Thanks again for putting that up!

    The latest FixedColumns nightly contains the fix and running your demo locally shows its memory use remaining stable.

    Regarding the column visibility, I had a little look at this. It appears to be caused by a listener that the Angular DataTables code adds that will destroy the DataTable when ColReorder has finished its reordering. The whole lot is then recreated, but with the original column visibility applied. What is interesting is that this isn't 100% reproducible - sometimes I need to try it a couple of times to trigger the error. It might be worth asking in the angular-datatables repo issues about this one as I'm afraid I have no knowledge of Angular myself.

    Regards,
    Allan

  • knetadminknetadmin Posts: 47Questions: 1Answers: 0
    edited June 2015

    Hi,
    i sent to you before about problem in fixed column and you sent new version, but i still have big performance issue make my app very slow because of memory leak
    and when disabling fixed column, no memory leak happened
    i attached links for testing for memory leak with fixed column and without it :

    http://kncairo.kn-it.org:8087/Etrade-Plus/resources/fixedColumn.jpg

    http://kncairo.kn-it.org:8087/Etrade-Plus/resources/withoutFixedColumn.jpg

    and i have url for you to test the problem :

    http://kncairo.kn-it.org:8087/Etrade-Plus/site/login

    username : mai002
    password : kn123456

    please click on refresh icon (in black square in attached image) more than one time to see the memory leak issue

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Thanks for the update. Unfortunately I'm not managed to get the time to take a look into this yet. I will try to do so as soon as possible.

    Allan

  • knetadminknetadmin Posts: 47Questions: 1Answers: 0

    Hi Allan,
    we are in closer phase of project and this is very critical for us

  • knetadminknetadmin Posts: 47Questions: 1Answers: 0

    Hi Allan,
    i want ask you if we renew our support, you can help us to fix this issue

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Hi,

    Yes, that would certainly allow me to prioritise this work over the other work that I am doing. I hope to look at this later this week even if you don't renew the support option. But purchasing support would make certain of it, and it would be done sooner rather than later.

    Regards,
    Allan

  • knetadminknetadmin Posts: 47Questions: 1Answers: 0

    Hi,
    i purchased support, please we need your priority in this issue

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Fantastic - thanks. I'm looking into this just now and will get back to you as soon as possible.

    Regards,
    Allan

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    I sent an e-mail a little while ago, it is possible it didn't get through so I'm posting here as well just in case!

    The links above does appear to be working at the moment. Could you possibly give me an updated link or bring the server back online so I can do a little bit of testing with your pages.

    Thanks,
    Allan

  • knetadminknetadmin Posts: 47Questions: 1Answers: 0

    Hi, Allan
    please, try now everything working now

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Great - thanks.

    Sorry to ask for one more thing - it appears the websocket that is being used is not resolving:

    ws://dev-dummy:61614/stomp' failed: Error in connection establishment: net::ERR_NAME_NOT_RESOLVED

    Unfortunately I'm struggling to reproduce the issue at the moment, so I thin I will need to be able to use your page to recreate the problem for diagnosis.

    Regards,
    Allan

  • knetadminknetadmin Posts: 47Questions: 1Answers: 0

    Hi Allan,
    i solved this problem, trying now

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    That's excellent - thank you.

    Could you confirm if I need to perform some action such as toggling table sorting, or tabs or something else to cause the memory leak to appear? I've just been running a memory trace in IE for the last 3 minutes and it is holding at a fairly static value.

    Many thanks,
    Allan

  • knetadminknetadmin Posts: 47Questions: 1Answers: 0

    Allan,
    over on the header that write on it orders details and you can find refresh button please click on it many times i set between in black square
    you can find it in this image http://kncairo.kn-it.org:8087/Etrade-Plus/resources/fixedColumn.jpg

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Fantastic - thanks for pointing that out! I've just been debugging this and I'm fairly certain that it is a conflict between DataTables an Angular when destroying a table - the way DataTables operates means that the Angular destroy method on the nodes doesn't occur, which results in an event being retained - hence the issue.

    I'm going to experiment a little bit more before committing the change required in DataTables. I'll do this first thing tomorrow morning and get back to you then. Hopefully that will resolve the issue!

    Allan

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    I've just committed the fix that I think is required to address this. I'm not able to test this directly on your system of course so it is possible that I've not fully fixed the issue, but I am hopeful that it will address it fully.

    To test, if you could try using the 1.10.8-dev version of DataTables on your page, that would be great.

    Many thanks,
    Allan

  • knetadminknetadmin Posts: 47Questions: 1Answers: 0

    Hi Allan,
    i put the file DataTables 1.10.8-dev, and tell me if you need to change any others files

  • allanallan Posts: 61,972Questions: 1Answers: 10,160 Site admin

    Thank you - unfortunately that doesn't appear to have fixed the issue after all. There is still an Angular hook somewhere that it causing the leak.

    The site runs exceptionally slowly on my machine making debugging it really difficult, so I'll need to spend a bit of time trying to recreate the issue locally and debug further. I'll get back to you when I have some more information.

    Thanks,
    Allan

This discussion has been closed.