This is a migrated thread and some comments may be shown as answers.

Memory Issues

3 Answers 55 Views
HTMLPlaceHolder
This is a migrated thread and some comments may be shown as answers.
Patrik
Top achievements
Rank 1
Patrik asked on 23 May 2014, 01:37 PM
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

3 Answers, 1 is accepted

Sort by
0
Zarko
Telerik team
answered on 28 May 2014, 03:50 PM
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.
 
0
Patrik
Top achievements
Rank 1
answered on 30 May 2014, 05:46 AM
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.
0
Zarko
Telerik team
answered on 31 May 2014, 04:03 PM
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.
 
Tags
HTMLPlaceHolder
Asked by
Patrik
Top achievements
Rank 1
Answers by
Zarko
Telerik team
Patrik
Top achievements
Rank 1
Share this question
or