Excessive Memory Consumption Without Release - Artem Control within AJAX Update Panel

Apr 20, 2010 at 11:51 AM

I have a requirement to display vehicles on a Google Map in real time based on GPS coordinate values.

I've developed a series of ASP.NET web pages, which has version 4.1 of the Artem Map control contained within an AJAX Update Panel.  The pages retrieve real time GPS data and places map markers based on calls made from an ASP Timer OnTick event.  There is a requirement that the pages not visibly repaint following the Timer OnTick event, hence the AJAX Update Panel.

Every time the Timer OnTick event fires, the browser consumes memory and never releases it, eventually locking up the system.  If the AJAX Update Panel is excluded, there is no memory consumption issue and the application runs indefinately without issue.

In an effort to simplify the application and identify the consumer, I implemented 2 test pages both containing an ASP Timer and Artem Map Control with one of the pages having the Artem Map Control contained within an AJAX Update Panel.  Extensive tests show memory holds at a consistent level, approx 50 meg, in the page without the AJAX Update Panel.  The page having the Artem Map Control within the Update Panel consumes memory every time the Timer OnTick event fires and never releases it.

I've seen several posts that others have had the same experience and that the problem has been resolved.  Does anyone have any suggestions?

Below is the code from the page with the Artem Map Control within an AJAX Update Panel:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wvTimerTestArtemAjax.aspx.cs" Inherits="wvClient.wvTimerTestArtemAjax" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title></title>
</head>

<body onunload="GUnload()">

    <form id="form1" runat="server">
    
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
            
                <asp:Timer 
                    ID="refreshTimer" 
                    runat="server"
                    Interval="10000" 
                    ontick="refreshTimer_Tick"
                    Enabled ="true">
                </asp:Timer>
            
                <div>
                
                    <center>
                    
                        <asp:Label 
                            ID="nextRefresh" 
                            runat="server" 
                            Font-Names="Verdana"
                            Text="Next Refresh:" 
                            Font-Size="10" 
                            ForeColor="SteelBlue">
                        </asp:Label>    
                    
                    </center>
                
                </div>
                
                <div>
                
                    <center>
                    
                        <asp:Label 
                            ID="Label1" 
                            runat="server" 
                            Font-Names="Verdana"
                            Text="Timer Interval In Seconds:" 
                            Font-Size="10" 
                            ForeColor="SteelBlue">
                        </asp:Label>    
                        
                        <asp:TextBox 
                            ID="timerInterval" 
                            runat="server"
                            Text="5">
                        </asp:TextBox> 
                    
                    </center>
                
                </div>
                
                <div>
                    <center>
                    
                        <artem:GoogleMap
                            ID="MapView" 
                            Height="616px"
                            Width="1000px" 
                            runat="server" 
                            Latitude="39.78474" 
                            Longitude="-105.00677"
                            Zoom="11" 
                            EnableMarkerManager="false"
                            ZoomPanType="Large3D"
                            AddTrafficButton="true"
                            StreetViewInfoWindow="true"
                            EnableScrollWheelZoom="true"
                            EnableGoogleMapState="true"
                            EnableViewState = "true">
                        </artem:GoogleMap>
                    
                    </center>
                </div>
            
            </ContentTemplate>
        </asp:UpdatePanel>
        
    </form>
</body>
</html>
CODE BEHIND:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace wvClient
{
    public partial class wvTimerTestArtemAjax : System.Web.UI.Page
    {
        private void Page_PreRender(object sender, EventArgs e)
        {
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            refreshTimer.Interval = Convert.ToInt32(timerInterval.Text) * 1000;
            nextRefresh.Text = "Last Refresh: " + DateTime.Now.ToString("MM/dd/yyyy HH:mm:ss");
        }

        protected void refreshTimer_Tick(object sender, EventArgs e)
        {                   
        }
    }
}


Oct 30, 2010 at 6:10 AM

I also have same problem.

Even though the memory leakage is occurred when the <artem:GoogleMap> tag is located at outside of <ContentTemplate> tag.. 

I use version 4.1.

 

Nov 12, 2010 at 5:16 PM

I have the same problem.  The problem is not resolved.  I've tried some things to resolve the problem but it persists.

Nov 30, 2010 at 4:29 AM

Hey guys, when using the update panel to envelope the GoogleMap control you have to set the size of the control in pixels not percentage.

try it out, this is a known issue in the control.

Regards,