Memory Issues

4 posts, 0 answers
  1. Patrik
    Patrik avatar
    56 posts
    Member since:
    Jul 2010

    Posted 23 May 2014 Link to this post

    Hello Telerik!

    In our Silverlight based CMS we have a tool for previewing a specific object in HTML using several HTMLPlaceHolder controls. The problem is that when these controls are loaded, a lot of memory is allocated to the Silverlight plugin and this memory doesn't seem to be released when the HTML place holders are unloaded. I have used Red Gates Ants memory profiles to make sure these controls don't remain in memory. The problem seems to be that the amount of unmanaged memory increases significantly in the jscript9 (+24 MB) and mshtml (+10 MB) dlls for just loading four placeholders.

    Our users tend to use the program for several hours at a time (and they won't accept showing just one placeholder, default we're showing four) and when the memory usage grows, the plugin gets slower and eventually they are forced to restart the browser or the computer because the application becomes unusable.

    I can provide you with the profiler results if they are of interest.

    I would appreciate if you have any tips on how to solve this situation. 

    Best regards,
    Patrik Edberg
  2. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 28 May 2014 Link to this post

    Hi Patrik,
    Could you please give some more information about your scenario so that we could try to reproduce the issue:
    - are you using windowless mode ?
    - are you showing external pages or HTML strings ?
    - do you open and close/remove them from the visual tree the Placeholders frequently ?
    - how do you unload the Placeholders ?
    There's a known memory leak issue with the HtmlPlaceholder and maybe your scenario is the same but we'll need more information in order to confirm this so any code snippets or additional elaboration will be appreciated.
    We're looking forward to hearing from you again.

    Regards,
    Zarko
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. DevCraft banner
  4. Patrik
    Patrik avatar
    56 posts
    Member since:
    Jul 2010

    Posted 30 May 2014 in reply to Zarko Link to this post

    Hello and thanks for your answer!

    I think I actually figured out the reason for the leak. Alla of the placeholders where loading contents from the same page but with different query strings and each placeholder in it self loaded a small silverlight app that we used for cross domain communication using local messaging. But it seems that the plugin loading in itself leaked a lot of javascript memory that was never returned (used the chrome memory profiler to find that out). I disabled all the code in the small silverlight app and it still leaked. The solution to the problem was to use window.postMessage for cross domain html to silverlight communication. It's both faster (due to no longer needing to load the plugin) and uses less memory now.
  5. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 31 May 2014 Link to this post

    Hello Patrik,
    I'm glad you were able to find and fix the memory leak and if there's something else please feel free to ask.

    Regards,
    Zarko
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top