I created a set of internal websites for our company to manage some of our processes. I noticed that these pages have massive memory leaks that force pages to use more than 150 mb of memory, which is ridiculous for a web page consisting of one form and a GridView that displays 7-10 lines of data for a while, sometimes with data that does not change for all day. This is a problem because it slows down our client machines due to lack of available memory.
After some testing, it turns out that the memory leak is extremely easy to play and very noticeable. I created a page with the following asp.net markup:
<body> <form id="form1" runat="server"> <div> <asp:scriptmanager ID="Scriptmanager1" runat="server"></asp:scriptmanager> <asp:Timer ID="timer1" runat="server" Interval="1000" /> <asp:UpdatePanel ID="UpdatePanel1" runat="server"> <ContentTemplate> </ContentTemplate> </asp:UpdatePanel> </div> </form> </body>
There is no code for this. This is the whole page. The launch of this site in Chrome shows that memory usage increases to 25 megabytes in the interval of 20-30 seconds. Leaving it to work for several minutes, the memory increases to 70 megabytes, etc.
Am I using timers and update panels incorrectly, or is it a pure Asp.net problem without any work?
Note. I'm not talking about the memory used on the server, I'm talking about the memory used on the client.
Edit: Well, it looks like this is a problem with Chrome. Firefox and IE8 do not seem to have memory problems with this page for a long period of time.
source share