PDA

View Full Version : [CLOSED] Memory Spikes in IE and other browsers



RCM
Mar 26, 2013, 3:02 PM
hi,

I am seeing very high memory spikes in IE and other browsers when I use Loader to load a view. Is there any way of minimizing the memory impact. see my sample below. I am using EXT.NET MVC. I see the same issue when I use the Loaders sample in the Examples explorer.


Is there something I am doing incorrectly why I am seeing the memory spikes. Can this be resolved. I use the loader to extensively to load different views in the IFrame. Each time a new view is loaded, there is significant increase in the browsers memory usage which is not release even when a new view is loaded in the IFrame.

Please advise.



I am having some issues with my firewall adding my sample as it contains JS code. I will upload as soon as I can. Is there any way for you to assist until I am able to add sample.

Vladimir
Mar 26, 2013, 3:07 PM
Do you use Loader with Frame mode? If yes then the memory consumption will be high because iframe as separate page, all resources are loaded for iframe also

I suggest do not use iframes at all because it is very hard for a browser, use partial rendering (it is better approach)
http://mvc.ext.net/#/Dynamic_Partial_Rendering/Partial_Items/
http://mvc.ext.net/#/Dynamic_Partial_Rendering/Add_Tab/
http://mvc.ext.net/#/Dynamic_Partial_Rendering/Partial_Content/
http://mvc.ext.net/#/Dynamic_Partial_Rendering/Window/

RCM
Mar 26, 2013, 3:53 PM
Hi,

Is there any way of releasing the resource in the IFrame. We have done some major development using iframe. Is there a temporary fix for releasing the resources.

Vladimir
Mar 26, 2013, 4:57 PM
Unfortunately, ExtJS has an old issue with releasing memory when iframe is destroyed
It is not fixed still by Sencha
http://www.sencha.com/forum/showthread.php?242897-High-memory-consumption-in-IE9-iframe

Therefore please consider to avoid iframes at all

RCM
Mar 26, 2013, 10:46 PM
Hi,

we are about to release and this is not an option at this point. We recognized this issue late in our process. Please let me know if you have any ideas or fix we could use until we are able to make this change which we will have to schedule as part of future release or patch.

Any help would be welcome.

Daniil
Mar 27, 2013, 5:03 AM
Unfortunately, we don't have a fix . The bug seems to lay deep inside ExtJS.

If you can provide a sample to reproduce, we would be happy to investigate. Maybe, we could come up with something in your case.

Could you also clarify how much memory leaks?

RCM
Mar 27, 2013, 2:08 PM
Hi,

I sent you an email with my sample as we are having some issues with our firewall which is preventing me from posting with JS and HTML content in the pots.

Daniil
Mar 27, 2013, 4:16 PM
Thank you. I am reposting here.

[Master]


<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>

<%@ Import Namespace="Ext.Net.MVC" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>
<asp:ContentPlaceHolder ID="TitleContent" runat="server" />
<asp:ContentPlaceHolder ID="MainContent" runat="server" />
</title>
<script src="/Scripts/jquery-1.5.1.js" type="text/javascript"></script>
<script type="text/javascript" src="/Scripts/Monitor.js"></script>
</head>
<body>
<form id="form1" runat="server" class="x-hidden">
<div style="display: none">
<cutewebui:uploader runat="server" />
</div>
</form>
<ext:ResourceManager ID="MasterResourceManager" runat="server" Theme="Gray">
</ext:ResourceManager>
<ext:Viewport ID="TheViewPoint" EnableTheming="True" runat="server" IDMode="Explicit"
Layout="BorderLayout">
<Items>
<ext:Panel runat="server" ID="NorthPanel" Region="North" AutoHeight="True">
<Items>
<ext:Toolbar ID="MainToolBar" runat="server">
<Items>
<ext:Button runat="server" ID="btn" Height="50" Text='Open View Port'>
<Listeners>
<Click Handler="Monitor.MenuItemOnClick({ title: 'Sample', linkurl: '/Grid/Index', icon: null, passParentSize: true})" />
</Listeners>
</ext:Button>
</Items>
</ext:Toolbar>
</Items>
</ext:Panel>
<ext:Panel ID="MainContentPanel" Layout="Fit" runat="server" BodyPadding="0" AutoScroll="false"
Border="False" Title="1" Region="Center">
<Loader ID="MainContentPanelLoader" runat="server" Mode="Frame" DisableCaching="true"
AutoLoad="false" Scripts="false">
</Loader>
<Items>
<ext:Panel runat="server">
</ext:Panel>
</Items>
<Listeners>
<AfterRender Handler="App.MainContentPanel.setTitle('');">
</AfterRender>
</Listeners>
</ext:Panel>
</Items>
</ext:Viewport>
</body>
</html>


Controller



public class GridController : Controller
{
//
// GET: /Grid/

public ActionResult Index()
{


return View("Index");
}

}


View Loaded by Loader


<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!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>
<meta content="NO-CACHE" http-equiv="CACHE-CONTROL" />
<%-- Override the default label seperator and set to ""--%>
<ext:ResourcePlaceHolder runat="server" Mode="ScriptFiles" />

</head>
<body>
<ext:ResourceManager runat="server">
</ext:ResourceManager>

<ext:Viewport ID="viewportResultView" runat="server" Layout="border" IDMode="Static">
<Items>
<ext:Panel ID="Panel2" runat="server" Title="Sample" Height="100" Region="Center">
<Items>
<ext:Button ID="Button1" runat="server" Text="Show Upload Dialog">
<Listeners>

</Listeners>
</ext:Button>
</Items>
</ext:Panel>
</Items>
<Listeners>

</Listeners>
</ext:Viewport>
</body>
</html>



JS


Monitor = {

MenuItemOnClick2: function (config) {

// App.MainContentPanel.clearContent();

App.MainContentPanel.load(
{
showMask: false,
url: config.linkurl,
disableCaching: true,
renderer: "frame",
passParentSize: config.passParentSize,
params: config.data,
scripts: "false"
}
);
},


MenuItemOnClick: function (config, item) {
if (Ext.isEmpty(config.isPopup)) {
config.isPopup = "false";
}
if (config.isPopup.toString().toLowerCase() == "false") {
var numericId = "452316466989"; // this.hashCode(config.linkUrl);
var id = "panel" + numericId;
var panel = App.MainContentPanel.getComponent(id);

if (App.MainContentPanel.items.length == 1) {
if (App.MainContentPanel.items.items[0].id == id) {

return;
}
}

var existingpanel = App.MainContentPanel.items.items[0];
if (existingpanel && existingpanel.configData) {
var page = Monitor.GetActiveTabBody();
if (page.ClearAllComponent) {
page.ClearAllComponent();
}
}

App.MainContentPanel.removeAll();

Ext.Function.defer(function () {
var panel = Ext.create('Ext.panel.Panel', {
id: id.toString(),
border: false,
configData: config,
loader: {
autoLoad: true,
renderer: "frame",
url: config.linkurl,
params: config.data
},
layout: "fit",
bodyPadding: 0
});
App.MainContentPanel.add(panel);


Ext.Function.defer(function () {
var iframe = $(panel.el.dom).find("iframe");
if (iframe.length > 0) {
var newId = "Iframe" + numericId;
iframe.attr("id", newId);
}
}, 100);
}, 100);

}
},



}

RCM
Mar 27, 2013, 4:28 PM
Hi,

Thank you.

When you click the Open View Port button when viewing IE mostly, you will see the memory for the IE process increasing between 10-50MB. Please let me know if you are able to see this.

Daniil
Mar 28, 2013, 10:21 AM
Unfortunately, the code that I reposted throws exceptions. So, I can't run it.

I am trying to run the project. It appears that it loads the default page well, but I can't see the "View port" button.

So, what view within the project should I open?

RCM
Mar 28, 2013, 12:53 PM
Hi,

The Master page contains the Open View Port button. This is the page that should be loaded initially by default when the application starts. The view below should be loaded in the IFrame when the button is selected. Please let me know if this helps. I could create a small visual studio project and email ti you if that would help.





<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"<a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" target="_blank">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</a>">
<html xmlns="<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>">
<head id="Head1" runat="server">
<title></title>
<meta content="NO-CACHE" http-equiv="CACHE-CONTROL" />
<%-- Override the default label seperator and set to ""--%>
<ext:ResourcePlaceHolder runat="server" Mode="ScriptFiles" />

</head>
<body>
<ext:ResourceManager runat="server">
</ext:ResourceManager>

<ext:Viewport ID="viewportResultView" runat="server" Layout="border" IDMode="Static">
<Items>
<ext:Panel ID="Panel2" runat="server" Title="Sample" Height="100" Region="Center">
<Items>
<ext:Button ID="Button1" runat="server" Text="Show Upload Dialog">
<Listeners>

</Listeners>
</ext:Button>
</Items>
</ext:Panel>
</Items>
<Listeners>

</Listeners>
</ext:Viewport>
</body>
</html>

RCM
Mar 28, 2013, 1:13 PM
Hi,

Sorry for the confusion, I just realized i had sent you the wrong project. I just resent the correct working project. Please confirm that it is good when you can.

thanks.

Daniil
Mar 28, 2013, 2:46 PM
Thank you.

I had to remove everything related to CuteWebUI.AjaxUploader to run the application.

When I click the Open View Port button the consumed memory increases for 20 MB (Windows 7, IE9).

Well, I can say it is OK for iframes. I don't think we have a chance to improve it. It is a cost of iframes.

We are talking about memory leaking, are not? Please clarify can we reproduce memory leaking using your sample? Seems, nohow. Am I wrong?

RCM
Mar 28, 2013, 4:12 PM
Hi,

The leak starts to occur if I Remove the current item from the Iframe and load another item. The memory keeps increasing and is not released.

If you remove the block of code below from the funtcion MenuItemOnClick in the Monitor.js file and keep clicking the Open View Port button. YOu will see a gradual increase in memory. The memory is not released when the content is removed from the Iframe.

Do you see this? I also sent you the updated sample.



if (App.MainContentPanel.items.length == 1) {
if (App.MainContentPanel.items.items[0].id == id) {

return;
}
}

var existingpanel = App.MainContentPanel.items.items[0];
if (existingpanel && existingpanel.configData) {
var page = Monitor.GetActiveTabBody();
if (page.ClearAllComponent) {
page.ClearAllComponent();
}
}

Daniil
Mar 29, 2013, 5:22 AM
Thank you. I don't think I can reproduce memory leaking.

Each Button click adds less than 0.5 MB.

Yes, initially, it adds about 40 MB, but it is release in a few seconds.

What exactly is your environment - browser/OS?

RCM
Mar 29, 2013, 2:09 PM
Hi,

I am using windows 7 64 bit with IE9 and in my environment it does not release until the browser is refreshed or closed.

RCM
Mar 29, 2013, 2:18 PM
Hi,

Also when there are more components in the view like grids and treepanels. The memory usage spikes even more. Do i need to to create a sample like this and send to you to look at. Because now in our application, the memory reaches 1GIG within 30 minutes of constant usage.

geoffrey.mcgill
Mar 29, 2013, 3:32 PM
Hi RCM,

Can you repost your code sample demonstrating how to reproduce the issue here in the forums. Please wrap your code sample in [CODE] tags.

geoffrey.mcgill
Mar 29, 2013, 3:35 PM
Hi,

I sent you an email with my sample as we are having some issues with our firewall which is preventing me from posting with JS and HTML content in the pots.

Please do not directly send us code samples. You can either post here in the forums inside [CODE] tags, or on another public code sharing site, then post a link to that code sample.

RCM
Mar 29, 2013, 7:30 PM
Hi,

Please see my sample below. Please ensure that you view the sample using IE9 with compatability mode disabled. I have 5 index pages, each page loads the same information. Navigating between each page using the buttons (Open One, Open Tow, Open Three, Open Four, Open Five) on the toolbar gradually increases the memory.

I am using a Windows7 X64.

I have updated to included a link to the CDN for Jquery. It did not make a difference to the memory. Var is not required before monitor.


Master Page


<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>

<%@ Import Namespace="Ext.Net.MVC" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>
</title>
<script src="http://code.jquery.com/jquery-1.9.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="/Scripts/Monitor.js"></script>
</head>
<body>
<form id="form1" runat="server" class="x-hidden">
</form>
<ext:ResourceManager ID="MasterResourceManager" runat="server" Theme="Gray">
</ext:ResourceManager>
<ext:Viewport ID="TheViewPoint" EnableTheming="True" runat="server" IDMode="Explicit"
Layout="BorderLayout">
<Items>
<ext:Panel runat="server" ID="NorthPanel" Region="North" AutoHeight="True">
<Items>
<ext:Toolbar ID="MainToolBar" runat="server">
<Items>
<ext:Button runat="server" ID="btn" Height="50" Text='Open One'>
<Listeners>
<Click Handler="Monitor.MenuItemOnClick({ title: 'Sample', linkurl: '/Grid/Index', icon: null, passParentSize: true})" />
</Listeners>
</ext:Button>

<ext:Button runat="server" ID="Button1" Height="50" Text='Open Two'>
<Listeners>
<Click Handler="Monitor.MenuItemOnClick({ title: 'Sample', linkurl: '/Grid/Index2', icon: null, passParentSize: true})" />
</Listeners>
</ext:Button>

<ext:Button runat="server" ID="Button2" Height="50" Text='Open Threet'>
<Listeners>
<Click Handler="Monitor.MenuItemOnClick({ title: 'Sample', linkurl: '/Grid/Index3', icon: null, passParentSize: true})" />
</Listeners>
</ext:Button>


<ext:Button runat="server" ID="Button3" Height="50" Text='Open Four'>
<Listeners>
<Click Handler="Monitor.MenuItemOnClick({ title: 'Sample', linkurl: '/Grid/Index4', icon: null, passParentSize: true})" />
</Listeners>
</ext:Button>


<ext:Button runat="server" ID="Button4" Height="50" Text='Open Five'>
<Listeners>
<Click Handler="Monitor.MenuItemOnClick({ title: 'Sample', linkurl: '/Grid/Index5', icon: null, passParentSize: true})" />
</Listeners>
</ext:Button>

</Items>
</ext:Toolbar>
</Items>
</ext:Panel>
<ext:Panel ID="MainContentPanel" Layout="Fit" runat="server" BodyPadding="0" AutoScroll="false"
Border="False" Title="1" Region="Center">
<Loader ID="MainContentPanelLoader" runat="server" Mode="Frame" DisableCaching="true"
AutoLoad="false" Scripts="false">
</Loader>
<Items>
<ext:Panel runat="server">
</ext:Panel>
</Items>
<Listeners>
<AfterRender Handler="App.MainContentPanel.setTitle('');">
</AfterRender>
</Listeners>
</ext:Panel>
</Items>
</ext:Viewport>
</body>
</html>


Controller


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Ext.Net.MVC;

namespace MVC3Sample.Controllers
{
public class GridController : Controller
{
//
// GET: /Grid/

public ActionResult Index()
{

return View("Index");
}

public ActionResult Index2()
{

return View("Index2");
}
public ActionResult Index3()
{

return View("Index3");
}
public ActionResult Index4()
{

return View("Index4");
}

public ActionResult Index5()
{

return View("Index5");
}

public StoreResult GetData(string filter = "", int start = 0, int pageSize = 1, int pageIndex = 1)
{


StoreResult response = new StoreResult();

List<User> data = new List<User>();

Random randow = new Random();
DateTime now = DateTime.Now;

for (int i = start + 1; i <= 67; i++)
{
User user = new User()
{
Firstname = "User " + i,
Lastname = "User Last " + i,
Age = i + 23
};

data.Add(user);
}

response.Data = data;
response.Total = 67;

return response;
}
}

public class User
{
public String Firstname { get; set; }

public String Lastname { get; set; }

public int Age { get; set; }
}
}



JS File


Monitor = {

MenuItemOnClick: function (config, item) {
if (Ext.isEmpty(config.isPopup)) {
config.isPopup = "false";
}
if (config.isPopup.toString().toLowerCase() == "false") {
var numericId = "452316466989"; // this.hashCode(config.linkUrl);
var id = "panel" + numericId;
var panel = App.MainContentPanel.getComponent(id);

App.MainContentPanel.load({
autoLoad: true,
renderer: "frame",
url: config.linkurl,
params: config.data
});


Ext.Function.defer(function () {
var iframe = $(App.MainContentPanel.el.dom).find("iframe");
if (iframe.length > 0) {
var newId = "Iframe" + numericId;
iframe.attr("id", newId);
}
}, 100);

}
else {
Monitor.ShowModal(config.linkUrl);
}
}

}



INDEX Page


<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!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>
<meta content="NO-CACHE" http-equiv="CACHE-CONTROL" />
<script src="/Scripts/Monitor.js" type="text/javascript"></script>
<script type="text/javascript">

</script>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server">
</ext:ResourceManager>

<ext:Viewport ID="viewportResultView" runat="server" Layout="border" IDMode="Static">
<Items>
<ext:Panel ID="Panel2" runat="server" Title="Sample" Height="100" Region="Center">
<Items>
<ext:GridPanel IDMode="Static" ID="gridPanelCompanyInformation" runat="server" Region="North"
Title="Array Grid" Width="600" Height="350">
<Store>
<ext:Store ID="Store1" runat="server" AutoLoad ="true" Buffered="true" PageSize = "100" >
<Proxy>
<ext:AjaxProxy DirectionParam="SortDirection" FilterParam="filter" LimitParam="pageSize"
GroupParam="Group" PageParam="pageIndex" SortParam="sort" StartParam="start"
Url="/Grid/GetData">
<Reader>
<ext:JsonReader TotalProperty = "total" Root = "data" messageProperty= "message" />
</Reader>
<ExtraParams>
</ExtraParams>
</ext:AjaxProxy>
</Proxy>
<Model>
<ext:Model ID="Model1" runat="server" >
<Fields>
<ext:ModelField Name="Firstname" />
<ext:ModelField Name="Lastname" />
<ext:ModelField Name="Age" Type="Int" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column ID="Column1" runat="server" Text="Firstname" DataIndex="Firstname" />
<ext:Column ID="Column2" runat="server" Text="Lastname" DataIndex="Lastname" />
<ext:Column ID="Column3" runat="server" Text="Age" DataIndex="Age" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
</SelectionModel>
</ext:GridPanel>
</Items>
</ext:Panel>
</Items>
<Listeners>
</Listeners>
</ext:Viewport>
</body>
</html>



INDEX2 Page


<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!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>
<meta content="NO-CACHE" http-equiv="CACHE-CONTROL" />
<script src="/Scripts/Monitor.js" type="text/javascript"></script>
<script type="text/javascript">

</script>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server">
</ext:ResourceManager>

<ext:Viewport ID="viewportResultView" runat="server" Layout="border" IDMode="Static">
<Items>
<ext:Panel ID="Panel2" runat="server" Title="Sample" Height="100" Region="Center">
<Items>
<ext:GridPanel IDMode="Static" ID="gridPanelCompanyInformation" runat="server" Region="North"
Title="Array Grid" Width="600" Height="350">
<Store>
<ext:Store ID="Store1" runat="server" AutoLoad ="true" Buffered="true" PageSize = "100" >
<Proxy>
<ext:AjaxProxy DirectionParam="SortDirection" FilterParam="filter" LimitParam="pageSize"
GroupParam="Group" PageParam="pageIndex" SortParam="sort" StartParam="start"
Url="/Grid/GetData">
<Reader>
<ext:JsonReader TotalProperty = "total" Root = "data" messageProperty= "message" />
</Reader>
<ExtraParams>
</ExtraParams>
</ext:AjaxProxy>
</Proxy>
<Model>
<ext:Model ID="Model1" runat="server" >
<Fields>
<ext:ModelField Name="Firstname" />
<ext:ModelField Name="Lastname" />
<ext:ModelField Name="Age" Type="Int" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column ID="Column1" runat="server" Text="Firstname" DataIndex="Firstname" />
<ext:Column ID="Column2" runat="server" Text="Lastname" DataIndex="Lastname" />
<ext:Column ID="Column3" runat="server" Text="Age" DataIndex="Age" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
</SelectionModel>
</ext:GridPanel>
</Items>
</ext:Panel>
</Items>
<Listeners>
</Listeners>
</ext:Viewport>
</body>
</html>



INDEX3 Page



<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!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>
<meta content="NO-CACHE" http-equiv="CACHE-CONTROL" />
<script src="/Scripts/Monitor.js" type="text/javascript"></script>
<script type="text/javascript">

</script>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server">
</ext:ResourceManager>

<ext:Viewport ID="viewportResultView" runat="server" Layout="border" IDMode="Static">
<Items>
<ext:Panel ID="Panel2" runat="server" Title="Sample" Height="100" Region="Center">
<Items>
<ext:GridPanel IDMode="Static" ID="gridPanelCompanyInformation" runat="server" Region="North"
Title="Array Grid" Width="600" Height="350">
<Store>
<ext:Store ID="Store1" runat="server" AutoLoad ="true" Buffered="true" PageSize = "100" >
<Proxy>
<ext:AjaxProxy DirectionParam="SortDirection" FilterParam="filter" LimitParam="pageSize"
GroupParam="Group" PageParam="pageIndex" SortParam="sort" StartParam="start"
Url="/Grid/GetData">
<Reader>
<ext:JsonReader TotalProperty = "total" Root = "data" messageProperty= "message" />
</Reader>
<ExtraParams>
</ExtraParams>
</ext:AjaxProxy>
</Proxy>
<Model>
<ext:Model ID="Model1" runat="server" >
<Fields>
<ext:ModelField Name="Firstname" />
<ext:ModelField Name="Lastname" />
<ext:ModelField Name="Age" Type="Int" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column ID="Column1" runat="server" Text="Firstname" DataIndex="Firstname" />
<ext:Column ID="Column2" runat="server" Text="Lastname" DataIndex="Lastname" />
<ext:Column ID="Column3" runat="server" Text="Age" DataIndex="Age" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
</SelectionModel>
</ext:GridPanel>
</Items>
</ext:Panel>
</Items>
<Listeners>
</Listeners>
</ext:Viewport>
</body>
</html>


INDEX4 Page



<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!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>
<meta content="NO-CACHE" http-equiv="CACHE-CONTROL" />
<script src="/Scripts/Monitor.js" type="text/javascript"></script>
<script type="text/javascript">

</script>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server">
</ext:ResourceManager>

<ext:Viewport ID="viewportResultView" runat="server" Layout="border" IDMode="Static">
<Items>
<ext:Panel ID="Panel2" runat="server" Title="Sample" Height="100" Region="Center">
<Items>
<ext:GridPanel IDMode="Static" ID="gridPanelCompanyInformation" runat="server" Region="North"
Title="Array Grid" Width="600" Height="350">
<Store>
<ext:Store ID="Store1" runat="server" AutoLoad ="true" Buffered="true" PageSize = "100" >
<Proxy>
<ext:AjaxProxy DirectionParam="SortDirection" FilterParam="filter" LimitParam="pageSize"
GroupParam="Group" PageParam="pageIndex" SortParam="sort" StartParam="start"
Url="/Grid/GetData">
<Reader>
<ext:JsonReader TotalProperty = "total" Root = "data" messageProperty= "message" />
</Reader>
<ExtraParams>
</ExtraParams>
</ext:AjaxProxy>
</Proxy>
<Model>
<ext:Model ID="Model1" runat="server" >
<Fields>
<ext:ModelField Name="Firstname" />
<ext:ModelField Name="Lastname" />
<ext:ModelField Name="Age" Type="Int" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column ID="Column1" runat="server" Text="Firstname" DataIndex="Firstname" />
<ext:Column ID="Column2" runat="server" Text="Lastname" DataIndex="Lastname" />
<ext:Column ID="Column3" runat="server" Text="Age" DataIndex="Age" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
</SelectionModel>
</ext:GridPanel>
</Items>
</ext:Panel>
</Items>
<Listeners>
</Listeners>
</ext:Viewport>
</body>
</html>


INDEX5 Page



<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<!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>
<meta content="NO-CACHE" http-equiv="CACHE-CONTROL" />
<script src="/Scripts/Monitor.js" type="text/javascript"></script>
<script type="text/javascript">

</script>
</head>
<body>
<ext:ResourceManager ID="ResourceManager1" runat="server">
</ext:ResourceManager>

<ext:Viewport ID="viewportResultView" runat="server" Layout="border" IDMode="Static">
<Items>
<ext:Panel ID="Panel2" runat="server" Title="Sample" Height="100" Region="Center">
<Items>
<ext:GridPanel IDMode="Static" ID="gridPanelCompanyInformation" runat="server" Region="North"
Title="Array Grid" Width="600" Height="350">
<Store>
<ext:Store ID="Store1" runat="server" AutoLoad ="true" Buffered="true" PageSize = "100" >
<Proxy>
<ext:AjaxProxy DirectionParam="SortDirection" FilterParam="filter" LimitParam="pageSize"
GroupParam="Group" PageParam="pageIndex" SortParam="sort" StartParam="start"
Url="/Grid/GetData">
<Reader>
<ext:JsonReader TotalProperty = "total" Root = "data" messageProperty= "message" />
</Reader>
<ExtraParams>
</ExtraParams>
</ext:AjaxProxy>
</Proxy>
<Model>
<ext:Model runat="server" >
<Fields>
<ext:ModelField Name="Firstname" />
<ext:ModelField Name="Lastname" />
<ext:ModelField Name="Age" Type="Int" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column runat="server" Text="Firstname" DataIndex="Firstname" />
<ext:Column ID="Column1" runat="server" Text="Lastname" DataIndex="Lastname" />
<ext:Column ID="Column2" runat="server" Text="Age" DataIndex="Age" />
</Columns>
</ColumnModel>
<SelectionModel>
<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
</SelectionModel>
</ext:GridPanel>
</Items>
</ext:Panel>
</Items>
<Listeners>
</Listeners>
</ext:Viewport>
</body>
</html>


View that Inherits Master Page


<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>




Controller for View

public class HomeController : Controller
{
public ActionResult Index()
{
return View();
}
}

geoffrey.mcgill
Mar 29, 2013, 8:09 PM
Please revise your sample to either remove the jQuery dependency, or link to an external CDN source of the library. If linking to a CDN, please double check that memory consumption issue is still present.

Should there be a 'var' infront of Monitor in your .js file?

RCM
Mar 29, 2013, 8:35 PM
hi,

I have updated the sample to point to the Jquery CDN. var is not required before monitor in the js file. Please verify that you are happy with the sample.

geoffrey.mcgill
Mar 29, 2013, 9:53 PM
A few questions:

1. Is the following ContentPlaceHolder required in the <title> of your "Master Page"?


<asp:ContentPlaceHolder ID="MainContent" runat="server" />

2. Can you demonstrate the View page that inherits from the MasterPage?

3. In Monitor.js, you define and call a ShowModal function. Is this required to demonstrate the problem. Can it be removed?

RCM
Mar 29, 2013, 10:15 PM
hi,

I have updated the sample. I removed the code you mentioned as they are not required. Please let verify that the sample is now Ok.

RCM
Apr 01, 2013, 10:12 AM
Hi,

Have you been able to reproduce the issue using the last sample I presented.

Daniil
Apr 01, 2013, 11:56 AM
I don't think I can reproduce.

I had been clicking the buttons about 20-30 times and the memory returned to its original state. Almost. Maybe, plus a little bit (a few megabytes or less) which, I think, could not be considered as memory leaking.

I tested with Windows 7 64 bit SP1 + IE9.

How many times do you click on the buttons to reproduce memory leaking (define it with numbers, please)?

Also what Ext.NET are you using to test with? I used the latest from the SVN trunk.

RCM
Apr 01, 2013, 12:35 PM
Hi,

The memory starts increasing after clicking each button at least 3 times. I am using the release version 2.1.1 released on the 2012-12-11.

RCM
Apr 01, 2013, 12:45 PM
Hi,

The only time I see the memory decreases is when I am using IE9 with Comparability mode enabled.

geoffrey.mcgill
Apr 01, 2013, 12:48 PM
Hi,

The memory starts increasing after clicking each button at least 3 times. I am using the release version 2.1.1 released on the 2012-12-11.

Any chance you can test with the latest code in svn?

Daniil
Apr 01, 2013, 12:48 PM
The memory starts increasing after clicking each button at least 3 times.

I definitely can't reproduce it after clicking 3 times.


I am using the release version 2.1.1 released on the 2012-12-11.

Can you retest with the latest Ext.NET from the SVN trunk? The situation might be better since Ext.NET v2.1.1 release.

We are also going to deploy a test project.

RCM
Apr 01, 2013, 1:39 PM
Hi,

I am going to download and test using the latest sources. Were you guys able to reproduce using the release version, 2.1.1

Daniil
Apr 01, 2013, 2:00 PM
Were you guys able to reproduce using the release version, 2.1.1

Yes, I do reproduce. I had been clicking the buttons about 15 times and the memory got increased for 500 MB. It is obvious that it is a memory leaking.

I tried again with the latest sources from the trunk and there is nothing similar to the problem with v2.1.1.

RCM
Apr 01, 2013, 2:36 PM
Hi,

I am seeing much better performance as you mentioned with the latest release. Are they any major changes that I need to be aware of for this release I have downloaded from SVN.

Daniil
Apr 01, 2013, 3:24 PM
Excellent. Thank you for confirming.


I am seeing much better performance as you mentioned with the latest release.

It has not been released yet, but v2.2 will appear soon (maybe, this week).


Are they any major changes that I need to be aware of for this release I have downloaded from SVN.

Well, nothing big. It is mostly bug fixes and new functionality.

There are a few breaking changes noted in the BREAKING_CHANGES.txt. Also, you could investigate the SVN log.

We are here to help if any problems will appear after migrating.

geoffrey.mcgill
Apr 01, 2013, 7:43 PM
We added your test files to a GitHub project:

https://github.com/extnet/Test

I also published the test project to a live server so we can all browser test the exact same site:

http://test.ext.net/

I just ran through a few tests with IE10 and the memory consumption was minimal, and recycled quickly.

RCM
Apr 01, 2013, 10:02 PM
Hi,

Thanks a lot for the great support provided with this issue. We are happy with the performance gain available from the latest revision. We are now deciding the best way forward as it relates to our release date.

thanks...

Tarun_Chand
Apr 15, 2013, 7:45 AM
Hi Danill,

I have went through this thread completely. We are also facing similar memory leak problem in our project. Unfortunately we can't use latest SVN trunk (Ver 2.2) in our project because with ver 2.2 we are facing some other issues. Currently we are using Ver 2.1. Is it possible to provide any help for ver 2.1?

Daniil
Apr 15, 2013, 12:13 PM
Is it possible to provide any help for ver 2.1?

I am afraid, we can't. We changed nothing regarding this problem in Ext.NET. So, the fateful change has been made on ExtJS side somewhere between ExtJS 4.1 and 4.2. I think there is no chance to get this change, because there was no ExtJS ticket (at least, publicly available) associated to this problem. I even think that ExtJS development team could not provide us with such a fix for ExtJS 4.1. To clarify: I am talking about ExtJS 4.1 and 4.2, because they are the bases of, respectively, Ext.NET v2.1 and v2.2.

The best we can do is to help with this:

because with ver 2.2 we are facing some other issues