PDA

View Full Version : [OPEN] [#10] Memory leaks‎



softmachine2011
Sep 17, 2012, 4:21 PM
Hi,

We are moving our MVC applitacion, in a very long and hard work, to the new Ext.NET 2.1 version. In this way, we have detected a huge memory leak problem using this new version.

When we open Tabs or Windows (in our case, windows are open dynamically via script), the explorer process has a great memory increase. But when we close a tab or a windows, there is only an small decrease. So, when we are working with the application a little bit, we can get 1GB of process memory in a moment.

We have tested Ext.NET 2.0 examples page, opening and closing tabs, and we have detected this problem too.

We have tested too previous Ext.NET 1.X versions (examples page and our application also), and it looks like memory tends to remain more stable. So it sounds liake a problem with the new version.

In our case, it looks like Firefox deals better with these memory leaks than IE and Chrome browsers.

This is a critical issue for us, so we are looking to know for you about how to solve this problem.


Regards.

Vladimir
Sep 17, 2012, 4:24 PM
Do you have the same problem with Examples Explorer?

We cannot say anything concrete without a sample to reproduce the issue

Daniil
Sep 17, 2012, 5:31 PM
Hi,

We are able to reproduce and investigating. Thank you for the report!

Aurelio
Sep 17, 2012, 11:11 PM

Vladimir
Sep 17, 2012, 11:24 PM
Yes, I can confirm it.
IFrame mode is problem. The problem is reproducible on pure ExtJS samples
For example, if open samples from http://docs.sencha.com/ext-js/4-1/#!/example then the memory grows
I will report to Sencha about it

Aurelio
Sep 18, 2012, 12:02 AM
Hi..Vladimir

Ok ..
I have test with many browser and Firefox is what increases less memory.

Thanks
Aurelio

softmachine2011
Sep 18, 2012, 8:59 AM
Thanks,

We are looking forward to having an early resolution.

Vladimir
Sep 18, 2012, 11:45 AM
I am affraid that we cannot give solution at this time because the problem in ExtJS toolkit
We are waiting confirmation from Sencha

softmachine2011
Sep 18, 2012, 12:05 PM
Well,

We hope Sencha will consider this as a very important bug, due to its critical impact.

As we can't deal with Sencha directly, we hope also you will take care of Ext.NET customers interest as usual.

Regards.

Daniil
Sep 18, 2012, 12:29 PM
We hope too.

By the way, here is the Sencha thread with the report.
http://www.sencha.com/forum/showthread.php?242897

geoffrey.mcgill
Sep 29, 2012, 3:26 AM
Tagging thread as [OPEN]

softmachine2011
Oct 05, 2012, 12:41 PM
Hi again,

Apart from Sencha thread, do you have any news about this issue from ExtJS folks?

We need to know when our application could be launched.

Regards.

Daniil
Oct 05, 2012, 2:08 PM
Hi,

Well, we think it is a deep bug in ExtJS. I am afraid we can't fix it. At least, soon.

Vladimir bumped the thread. We hope to get any response from ExtJS team to go further.

softmachine2011
Oct 17, 2012, 10:23 AM
Hi again,

We are near to end our new application release based on migration to Ext.NET 2.X version and adding also new functionality. We need any kind of solution regarding this issue, so we can't go to market with this huge problem.

Thanks.

geoffrey.mcgill
Oct 17, 2012, 11:49 AM
Just to confirm, are you using Ext.NET 2.1? and you have updated from SVN recently.

I ran a few tests and was able to reproduce the memory increase using the Examples Explorer (svn version, running locally).



IE9/Win7, opened new instance of IE.
Memory started at ~50mb with no page loaded.
With Examples Explorer loaded (no example tabs open) memory was ~74mb
Opened many many tabs and memory increased to ~300mb.
After close all tabs memory reduced to ~123mb.


I don't think we're going to be able to work-around the Memory growth is an issues (opening new tabs). But, I think we should be able to come up with some work-arounds for doing a better <iframe> cleanup once the Tab is destroyed. That should at least help free up more memory once the Tab/<iframe> is removed.

We are investigating.

softmachine2011
Oct 17, 2012, 1:52 PM
Hi,

At the moment, we are in Ext.NET 2.1 rev.4377.

We use iframes in tabs and also in all detail's windows (opening them dynamically via script). So in our case, memory usage becomes even worse, and we can had 2GB + very quickly.

That's unusable for any of our clients.

Remove iframes for all our details windows implies a deep impact in our user layer architecture and this would cost us several months of work (added to our 4+ months migrating to Ext.NET 2.X), when there was no problem working in this way with Ext.NET 1.X version.

softmachine2011
Oct 26, 2012, 12:26 PM
Hi again,

Do you have any way to deal this issue directly with ExtJS folks, other than Sencha forum?

This is a critical and urgent problem for us, as this makes us impossible to release our new product version.

Thanks.

geoffrey.mcgill
Oct 26, 2012, 4:34 PM
Hi again,

Do you have any way to deal this issue directly with ExtJS folks, other than Sencha forum?

This is a critical and urgent problem for us, as this makes us impossible to release our new product version.

Thanks.

I've spent a lot time this last week investigating the problem and the end result is not much to show.

I all my tests (Win7), the memory grows with each new page (iframe) that is opened. The memory growth is relatively consistent in each browser (Chrome, Firefox, IE9) growing to approx 300mb after 20 tabs are opened. When the tabs are closed, the memory is slowly recycled with each of the browsers performing this in a different way.

With Firefox, the memory does not immediately recycle upon tab close, but it does start cleaning up after a minute. The final amount is destroyed once the Page is refreshed/reloaded.

With IE, the memory it appears approx 80% of the original tab memory is recycled immediately. After closing all tabs, and waiting a few moments, the memory seems to level off at the Original Value + 20%. Obviously that value could also grow over time as the application is used.

These results are on my machine, and others testers are getting varied results, which is making this tough to test.

At the moment, unfortunately we do not have a comprehensive fix for this <iframe> memory consumption issue. We are continuing to work on the problem, but other than that I don't have much to offer. It's a very difficult problem to solve, but it remains our #1 priority.

softmachine2011
Nov 06, 2012, 11:24 AM
Hi,

As we expose in previous posts, this problem is an urgent and critical issue for us. We have spent several months migrating our main application to 2.X version, we have developed also new complex functionalities using this new release and we are waiting for new ones.

At this point we are ready to launch our new version to the market, but we are with hands and feet tied due to the big impact of this issue.

In this way, we need information about any estimated date to get this problem solved, because we need to know if we must to stop developing with 2.X and focus our effort on 1.X version.

Please, could you or we deal this issue directly with Sencha? Or could we help you in any way to treat this problem with them?

We need any information about an specific date as soon as possible to determine our corporate strategy.

Thanks again.

softmachine2011
Nov 09, 2012, 8:58 AM
Hi,

We know this issue cannot be resolved immediately. But please, we need an estimated date to know how we must proceed.

Thanks.

geoffrey.mcgill
Nov 16, 2012, 5:44 AM
Opened an Issue on GitHub to track this defect, see

https://github.com/extnet/Ext.NET/issues/10

softmachine2011
Dec 12, 2012, 8:27 AM
Hi,

Yesterday was released a new version of ExtJS 4.2.

Do you know if you have fixed the memory leaks?

And, do you have a roadmap to incorporate it into the SVN Ext.NET?

Greetings,

Vladimir
Dec 12, 2012, 8:44 AM
It is beta only (not final release)
We are updating trunk version with ExtJS 4.2 beta, it should be finished in 2-3 days
We will post here when you can update



You know if you have fixed the memory leaks?

We cannot say yet, we will retest Ext.Net after ExtJS update and notify you

geoffrey.mcgill
Feb 22, 2013, 12:34 AM
We are going to devote some more time to investigating this Memory Leak issue, but we need your help.

Can you do the following:



Upgrade to the latest Ext.NET release in SVN.

We recently updated to the /trunk/ to ExtJS 4.2 (2013-02-13). It's possible the Memory Leak situation has improved.
Is the problem still present? Has the memory usage improved, become worse or is about the same?
Unless there has been a significant improvement, we need your help in narrowing down the problem.

The best way for us to ensure we're all dealing with the same problem is to create a sample which demonstrates how to reproduce the problem consistently. Once we have a sample we all confirm reproduces the memory leak problem, we can investigate deep into the problem and we provide this information to Sencha so their devs can begin an investigation.

Creating a consistently reproducible sample has been a difficult task. If we can build a focused sample which consistently reproduces the problem, then we should be able to make real progress in fixing this defect.
What browser are you testing with?
What operating system is the browser running under?
Is the problem reproduced in other browsers and/or operating systems?


The more details you can provide about the better we will be able to diagnose and hopefully fix.

Aurelio
Feb 22, 2013, 11:01 AM

geoffrey.mcgill
Feb 27, 2013, 5:32 AM
Hi Aurelio,

This is excellent news. Thanks for running these tests and posting the results. We really appreciate your assistance.

@softmachine2011 - Can you confirm these results with your application?

softmachine2011
Mar 05, 2013, 12:48 PM
Hi,

We have performed some test to our application and if you open a window in an iframe, closes it, and repeat this 5-6 times. Memory increases, and when window is closed, memory decrease a bit but, not all memory that growths in the opening.

It uses 40MB in a window opening and it releases 12MB at closing event. There are 26MB remaining in memory.

Also we realized that in sencha docs says that closeAction is default destroy, but I must write it explicitly or it doesn't release memory.

Daniil
Mar 05, 2013, 1:00 PM
Also we realized that in sencha docs says that closeAction is default destroy, but I must write it explicitly or it doesn't release memory.

CloseAction of tabs in Ext.NET should be also Destroy by default.

So, are you saying that there is no memory leaking if set up CloseAction to Destroy explicitly?


It uses 40MB in a window opening and it releases 12MB at closing event. There are 26MB remaining in memory.

It can depend on Garbage Collector logic of a browser. Commonly, garbage collection doesn't occur on each, for example, removing a DOM object. It would slow down an application's performance.

It occurs periodically in some intervals according some logic.

So, to ensure there is memory leaking or not, it needs to fulfill a long test.

EDIT


CloseAction of tabs in Ext.NET should be also Destroy by default.

Sorry, I missed the fact that you asked about a Window. Yes, it is Hide for a Window in Ext.NET as Vladimir said.

Vladimir
Mar 05, 2013, 1:02 PM
It uses 40MB in a window opening and it releases 12MB at closing event. There are 26MB remaining in memory.

It doesn't indicate that it is memory leakage because grabage collector can run if memory exceeds some limit only therefore such small memory consumption can be ignored by garbage collector. Do you able to reproduce large memory leakage (200-300 MB)?



Also we realized that in sencha docs says that closeAction is default destroy, but I must write it explicitly or it doesn't release memory.

Yes, in Ext.Net default mode is Hide, you need to set Destroy explicitly

softmachine2011
Mar 05, 2013, 3:02 PM
It doesn't indicate that it is memory leakage because grabage collector can run if memory exceeds some limit only therefore such small memory consumption can be ignored by garbage collector. Do you able to reproduce large memory leakage (200-300 MB)?

A quick simple test that I can perform is the next one:
-Open my application: 121MB
-Open a tab (iframe) that contains a grid: 153MB

-Open a window (iframe): 224MB and close it: 212MB
-Open a window (iframe): 259MB and close it: 247MB
-Open a window (iframe): 295MB and close it: 283MB
-Open a window (iframe): 328MB and close it: 316MB
-Open a window (iframe): 360MB and close it: 348MB
-Open a window (iframe): 400MB and close it: 388MB

After doing this, I expected that my memory usage has been around 153MB like before open any window. I can understand that memory is higher than 153MB because garbage collector recycle it periodically. But there are 235MB more of memory usage with the same result.

Tested under IE 9.0.8112.16421 in Windows7 Professional Service Pack 1 (32bit)

Is this significant or you consider that is a normal situation?

Vladimir
Mar 05, 2013, 4:16 PM
Is this significant or you consider that is a normal situation?

No, it is not normal, can you provide your test case? Just I tested on the same configuration (Win7 SP1, IE9) and tried with Examples Explorer (open several tabs and close, several times), memory always returns to 200-210 MB after closing all tab (initial memory (until first tab opening) is 130 MB)

softmachine2011
Mar 07, 2013, 3:10 PM
Hi again,

We have performed your same test using the same configuration (Win7 SP1, IE9) and with your last Examples Explorer's trunk version.

We tested GridPanel > ArrayGrid > ArrayWithPaginig sample. It is just a simple grid inside a tab scenario.

Starting from 118MB, after open and close this tab 10 times, we get a memory consumption of 382MB. Performing the same process 10 more times, we get a total of 638MB. That's an overhead of 26MB each time.

We have the same scenario, but we open also our detail windows using iframes, so our memory consumption is even worst. And for more complex windows, greater memory overhead. That's an unusable scenario for an strandard user.

We started to use iframes from your same sample code, and now we can't avoid to use them because it would be extremely expensive for us. We have spend also severals months of work performing new developments and migrating our application to the new Ext.NET 2.X version, that now we can't bring it to market.

Please, based on your same sample, could you provide us any suggestion or try to deal with Sencha folks in order to solve this huge problem?

Thanks.

geoffrey.mcgill
Mar 07, 2013, 3:54 PM
We will try to reproduce your results using the following sample from Examples Explorer:


GridPanel > ArrayGrid > ArrayWithPaging

We will try to setup a Virtual Machine with these exact specs:


IE 9.0.8112.16421 in Windows7 Professional Service Pack 1 (32bit)

Based on your descriptions, this should reproduce the memory leak issues when using the /trunk/ version of Ext.NET.

Can you confirm this is correct?

softmachine2011
Mar 07, 2013, 4:35 PM
Yes,

That's exactly our test case.

Daniil
Apr 01, 2013, 3:22 PM
We will try to reproduce your results using the following sample from Examples Explorer:


GridPanel > ArrayGrid > ArrayWithPaging

We will try to setup a Virtual Machine with these exact specs:


IE 9.0.8112.16421 in Windows7 Professional Service Pack 1 (32bit)

Based on your descriptions, this should reproduce the memory leak issues when using the /trunk/ version of Ext.NET.


The only difference I have is Windows 7 Home Premium 64 bit. I can't reproduce the problem.

@softmachine2011, it seems obvious, but could you, please, confirm you are using the latest sources from the trunk?
http://svn.ext.net/premium/trunk/


We have spend also severals months of work performing new developments and migrating our application to the new Ext.NET 2.X version, that now we can't bring it to market.


Please clarify are you talking about the migration from v1 to v2.1 or from v2.1 to the trunk?

Daniil
Apr 02, 2013, 5:29 AM
I can't add that I can reproduce memory leaking with the ArrayGridWithPaging example using the Ext.NET v2.1.1 release.

softmachine2011
Apr 02, 2013, 10:48 AM
The only difference I have is Windows 7 Home Premium 64 bit. I can't reproduce the problem.

@softmachine2011, it seems obvious, but could you, please, confirm you are using the latest sources from the trunk?
http://svn.ext.net/premium/trunk/


Our test was performed with premium trunk version from March 3, 2013.

Now, we can reproduce locally the same issue with current April 2, 2013 version. And also running ArrayWithPagining directly from http://examples.ext.net



Please clarify are you talking about the migration from v1 to v2.1 or from v2.1 to the trunk?

We referred to migration process from v1 to v2.1.

Daniil
Apr 03, 2013, 12:00 PM
Now, we can reproduce locally the same issue with current April 2, 2013 version. And also running ArrayWithPagining directly from http://examples.ext.net

It is weird. I can't reproduce.

Can you reproduce memory leaking here?
http://test.ext.net/

Just click the buttons.

jchau
Apr 03, 2013, 3:13 PM
Just want to chime in and say I can not reproduce memory leak issue with http://test.ext.net/ . IE9, Win7. IE process hovers around 85-90mb after clicking the different buttons 10-20 times. It peaks at 115-120mb then drops back down to 85-90mb.

Daniil
Apr 03, 2013, 3:20 PM
@jchau, thank you very for taking time on this!

softmachine2011
Apr 04, 2013, 2:15 PM
Can you reproduce memory leaking here?
http://test.ext.net/

Just click the buttons.

We have no memory overhead with this sample. IE process remains always over 10-13Mb clicking several times all the buttons.

Is this sample using iframes?

We get this problem basically opening and closing tabs, or detail windows, that are using iframes to load its content.

Daniil
Apr 04, 2013, 4:59 PM
We have no memory overhead with this sample. IE process remains always over 10-13Mb clicking several times all the buttons.


Thank you for confirming.



Is this sample using iframes?


Yes, it is. Each button click renders a new iframe.

Can you reproduce memory leaking here with the GridPanel/ArrayGrid/ArrayWithPaging example? I can't.
http://examples2.ext.net

softmachine2011
Apr 05, 2013, 2:53 PM
Hi,

Tested it again with these specifications:


IE 9.0.8112.16421 in Windows7 Professional Service Pack 1 (32bit)

Test over http://test.ext.net/

- Starting at 33MB, after opening & closing all 5 buttons, we get 65MB and then downs to 60MB.
- Opening & closing all 5 buttons one more time, we get also 66MB and then downs again to 60MB.

Test over http://examples2.ext.net/

- Starting at 70MB, after opening & closing GridPanel/ArrayGrid/ArrayWithPaging 10 times, we get 225MB.
- After that, repeating the same process 10 more times (for a total of 20), we get 378MB.
- That's an overhead of 15.4MB each time.

Tested on March 3, 2013 over http://examples2.ext.net/

- Starting at 118MB, after opening & closing GridPanel/ArrayGrid/ArrayWithPaging 10 times, we get 382MB.
- After that, repeating the same process 10 more times (for a total of 20), we get 638MB.
- That's an overhead of 26MB each time.


So it looks there's a clear improvement with version 2.2 on Examples Explorer, but that's a very simple sample and maybe this memory improvement would not be enough having more complex views, using iframes more extensively too, and also for a longer application use, as a real user would do.

Daniil
Apr 05, 2013, 5:03 PM
Thank you for the details.



Test over http://examples2.ext.net/

- Starting at 70MB, after opening & closing GridPanel/ArrayGrid/ArrayWithPaging 10 times, we get 225MB.
- After that, repeating the same process 10 more times (for a total of 20), we get 378MB.
- That's an overhead of 15.4MB each time.


Can you test it on another machine (-s)? We tested on the three ones and can't reproduce.

softmachine2011
Apr 08, 2013, 8:01 AM
Tested again in another machine with the same specifications

IE 9.0.8112.16421 in Windows7 Professional Service Pack 1 (32bit)

Test over http://examples2.ext.net/
- Starting at 183MB, after opening & closing GridPanel/ArrayGrid/ArrayWithPaging 10 times, we get 478MB.
- After that, repeating the same process 10 more times (for a total of 20), we get 770MB.
- In this case the overhead is greather than first case, an overhead average of around 29MB each time

Test over http://examples2.ext.net/
- Starting at 159MB, after opening & closing GridPanel/ArrayGrid/ArrayWithPaging 10 times, we get 165MB.
- After that, repeating the same process 10 more times (for a total of 20), we get 169MB.
- It seems that it has improved compared to the previous version.


Do you need any other configurations on our computer(s)?

softmachine2011
Apr 16, 2013, 4:15 PM
Hi again,

Based on your same Examples Explorer project from Trunk, we have adapted "GridPanel > Miscellaneous > Details Window" sample, as it is closer to our usual application maintenances.

In this way, we have a master paged grid in a framed tab and records details are edited into a Detail Window. Our changes are related with open all detail windows dynamically using frames.

In order to test memory leaks, we open and close several detail windows and look how IE process continually grows in the Task Manager. As more complex a window is, more memory is consumed, but we have a quick memory increase in this case (about 500MB+ opening and closing 15 windows).

Here is our sample code:

Default.aspx


<%@ Page Language="C#" %>

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

<%@ Register src="WindowEditor.ascx" tagname="WindowEditor" tagprefix="uc1" %>

<!DOCTYPE html>

<html>
<head runat="server">
<title>Custom Window with Record Details - Ext.NET Examples</title>
<link href="/resources/css/examples.css" rel="stylesheet" />

<script>
var CompanyX = {
_index : 0,

getIndex : function () {
return this._index;
},

setIndex : function (index) {
if (index > -1 && index < App.GridPanel1.getStore().getCount()) {
this._index = index;
}
},

getRecord : function () {
var rec = App.GridPanel1.getStore().getAt(this.getIndex()); // Get the Record

if (rec != null) {
return rec;
}
},

edit : function (index) {
this.setIndex(index);
this.open();
},

next : function () {
this.edit(this.getIndex() + 1);
},

previous : function () {
this.edit(this.getIndex() - 1);
},

refresh : function () {
App.GridPanel1.getView().refresh();
},

open: function () {
var w = new Ext.Window({
closeAction: 'destroy',
renderTo: Ext.getBody(),
resizable: true,
maximizable: false,
minimizable: false,
collapsible: false,
draggable: true,
isMinimized: false,
isMaximized: false,
minWidth: 400,
minHeight: 400,
width: 460,
height: 460,
isModal: false,
constrain: true,
loader: {
url: 'Detail.aspx?idx=' + this.getIndex(),
renderer: 'frame',
disableCaching: true,
loadMask: {
showMask: true
},
listeners: {
load: function (control) {
control.target.iframe.dom.contentWindow.parentWind ow = control.target;
}
}
},
listeners: {
close: {
fn: function (el) {
el.destroy();
}
}
}
});

w.show();
}
};
</script>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />

<h1>Custom Window with Record Details</h1>

<p>For view/edit additional properties please click on the image in last column.</p>

<ext:GridPanel
runat="server"
ID="GridPanel1"
Title="Employees"
Height="200">
<Store>
<ext:Store runat="server" PageSize="5">
<Proxy>
<ext:AjaxProxy Url="../../Shared/EmployeesControler.ashx">
<ActionMethods Read="POST" />
<Reader>
<ext:JsonReader TotalProperty="total" Root="data" />
</Reader>
<Listeners>
<Exception Handler="Ext.MessageBox.alert('Load failed', response.statusText);" />
</Listeners>
</ext:AjaxProxy>
</Proxy>
<Model>
<ext:Model runat="server" IDProperty="EmployeeID">
<Fields>
<ext:ModelField Name="EmployeeID" />
<ext:ModelField Name="FirstName" />
<ext:ModelField Name="LastName" />
<ext:ModelField Name="Title" />
<ext:ModelField Name="TitleOfCourtesy" />
<ext:ModelField Name="BirthDate" Type="Date" />
<ext:ModelField Name="HireDate" Type="Date" />
<ext:ModelField Name="City" />
<ext:ModelField Name="Address" />
<ext:ModelField Name="Region" />
<ext:ModelField Name="PostalCode" />
<ext:ModelField Name="Country" />
<ext:ModelField Name="Homephone" />
<ext:ModelField Name="Extension" />
<ext:ModelField Name="Notes" />
<ext:ModelField Name="Photopath" />
<ext:ModelField Name="ReportsTo" />
</Fields>
</ext:Model>
</Model>
<Sorters>
<ext:DataSorter Property="LastName" Direction="ASC" />
</Sorters>
</ext:Store>
</Store>
<ColumnModel runat="server">
<Columns>
<ext:Column runat="server" Text="Full Name" DataIndex="LastName" Flex="1">
<Renderer Handler="return '<b>' + record.data['LastName'] + '</b>,' + record.data['FirstName']" />
</ext:Column>
<ext:Column runat="server" Text="Title" DataIndex="Title" Width="150">
<Editor>
<ext:TextField runat="server" />
</Editor>
</ext:Column>
<ext:DateColumn runat="server" Text="Birth Date" DataIndex="BirthDate" Format="yyyy-MM-dd">
<Editor>
<ext:DateField runat="server" Format="yyyy-MM-dd" />
</Editor>
</ext:DateColumn>
<ext:Column runat="server" Text="City" DataIndex="City" Width="100">
<Editor>
<ext:TextField runat="server" />
</Editor>
</ext:Column>
<ext:Column runat="server" Text="Address" DataIndex="Address" Width="250">
<Editor>
<ext:TextField runat="server" />
</Editor>
</ext:Column>
<ext:CommandColumn runat="server" Width="35">
<Commands>
<ext:GridCommand Icon="NoteEdit" CommandName="Edit">
<ToolTip Text="Edit" />
</ext:GridCommand>
</Commands>
<Listeners>
<Command Handler="CompanyX.edit(recordIndex);" />
</Listeners>
</ext:CommandColumn>
</Columns>
</ColumnModel>
<BottomBar>
<ext:PagingToolbar
runat="server"
DisplayInfo="true"
DisplayMsg="Displaying employees {0} - {1} of {2}"
EmptyMsg="No employees to display"
/>
</BottomBar>
</ext:GridPanel>

<uc1:WindowEditor ID="WindowEditor1" runat="server" />
</form>
</body>
</html>

Detail.aspx


<%@ Page Language="C#" %>

<%@ Import Namespace="Ext.Net.Examples.Northwind"%>

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

<!DOCTYPE html>

<html>
<head runat="server">
<title>Custom Window with Record Details - Ext.NET Examples</title>
<link href="/resources/css/examples.css" rel="stylesheet" />

<script runat="server">
protected void Page_Load(object sender, EventArgs e)
{
this.EmployeesStore.DataSource = Employee.GetAll();
this.EmployeesStore.DataBind();
}
</script>
<script type="text/javascript">
var Detail = {

load: function () {
var index = '<%= Request["idx"] %>';
var rec = App.EmployeesStore.getAt(index);

if (rec != null) {
parentWindow.setTitle(Ext.String.format("Employee Details : {0}, {1}", rec.data.LastName, rec.data.FirstName));

//CompanyInfoTab.form.loadRecord(rec);
//PersonalInfoTab.form.loadRecord(rec);
}
}
};
</script>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />

<ext:Viewport runat="server" Layout="BorderLayout" Border="false">
<Items>
<ext:Panel runat="server" Region="North" Border="false">
<TopBar>
<ext:Toolbar runat="server">
<Items>
<ext:SplitButton runat="server" Text="Menu Button" IconCls="add16">
<Menu>
<ext:Menu runat="server">
<Items>
<ext:MenuItem runat="server" Text="Menu Button 1" />
</Items>
</ext:Menu>
</Menu>
</ext:SplitButton>
<ext:ToolbarSeparator />
<ext:SplitButton runat="server" Text="Cut" IconCls="add16">
<Menu>
<ext:Menu runat="server">
<Items>
<ext:MenuItem runat="server" Text="Cut Menu Item" />
</Items>
</ext:Menu>
</Menu>
</ext:SplitButton>
<ext:Button runat="server" Text="Copy" IconCls="add16" />
<ext:Button runat="server" Text="Paste" IconCls="add16">
<Menu>
<ext:Menu runat="server">
<Items>
<ext:MenuItem runat="server" Text="Paste Menu Item" />
</Items>
</ext:Menu>
</Menu>
</ext:Button>
<ext:ToolbarSeparator />
<ext:Button runat="server" Text="Format" IconCls="add16" />
</Items>
</ext:Toolbar>
</TopBar>
<Items>
<ext:Toolbar runat="server">
<Items>
<ext:Button runat="server" Icon="Add">
<Listeners>
<Click Handler="Ext.Msg.alert('Click','Click on Add');" />
</Listeners>
<ToolTips>
<ext:ToolTip runat="server" Html="Simple button" />
</ToolTips>
</ext:Button>

<ext:Button runat="server" Icon="Accept">
<Listeners>
<Click Handler="Ext.Msg.alert('Click','Click on Accept');" />
</Listeners>
<ToolTips>
<ext:ToolTip runat="server" Html="Simple button" />
</ToolTips>
</ext:Button>

<ext:Button runat="server" Icon="Delete">
<Listeners>
<Click Handler="Ext.Msg.alert('Click','Click on Delete');" />
</Listeners>
<ToolTips>
<ext:ToolTip runat="server" Html="Simple button" />
</ToolTips>
</ext:Button>

<ext:ToolbarSeparator/>

<ext:Button runat="server" EnableToggle="true" ToggleGroup="Group1" Icon="GroupAdd" Pressed="true" />
<ext:Button runat="server" EnableToggle="true" ToggleGroup="Group1" Icon="GroupDelete" />
<ext:Button runat="server" EnableToggle="true" ToggleGroup="Group1" Icon="GroupEdit" />
</Items>
</ext:Toolbar>
</Items>
</ext:Panel>
<ext:TabPanel runat="server" Region="Center" Layout="FitLayout" Border="false">
<Items>
<ext:FormPanel
ID="CompanyInfoTab"
runat="server"
Title="Company Info"
Icon="ChartOrganisation"
DefaultAnchor="100%"
BodyPadding="5">
<Items>
<ext:TextField ID="EmployeeID1" runat="server" FieldLabel="Employee ID" Disabled="true" Name="EmployeeID" />
<ext:TextField ID="FirstName" runat="server" FieldLabel="First Name" Name="FirstName" />
<ext:TextField ID="LastName" runat="server" FieldLabel="Last Name" Name="LastName" />
<ext:TextField ID="Title" runat="server" FieldLabel="Title" Name="Title" />
<ext:ComboBox
ID="ReportsTo"
runat="server"
FieldLabel="Reports to"
AllowBlank="true"
DisplayField="LastName"
ValueField="EmployeeID"
TypeAhead="true"
QueryMode="Local"
Name="ReportsTo"
ForceSelection="true"
TriggerAction="All"
EmptyText="Select an employee...">
<Store>
<ext:Store ID="EmployeesStore" runat="server">
<Model>
<ext:Model runat="server" IDProperty="EmployeeID">
<Fields>
<ext:ModelField Name="EmployeeID" />
<ext:ModelField Name="FirstName" />
<ext:ModelField Name="LastName" />
</Fields>
</ext:Model>
</Model>
<Listeners>
<Load Handler="Detail.load();" />
</Listeners>
</ext:Store>
</Store>
</ext:ComboBox>
<ext:DateField ID="HireDate" runat="server" FieldLabel="Hire date" Format="yyyy-MM-dd" Name="HireDate" />
<ext:TextField runat="server" ID="Extension" FieldLabel="Extension" Name="Extension" />
</Items>
</ext:FormPanel>
<ext:FormPanel
ID="PersonalInfoTab"
runat="server"
Title="Personal Info"
Icon="User"
DefaultAnchor="100%"
BodyPadding="5">
<Items>
<ext:TextField ID="EmployeeID2" runat="server" FieldLabel="Employee ID" Disabled="true" Name="EmployeeID" SubmitValue="false" />
<ext:TextField ID="Address" runat="server" FieldLabel="Address" Name="Address" />
<ext:TextField ID="City" runat="server" FieldLabel="City" Name="City" />
<ext:TextField ID="PostCode" runat="server" FieldLabel="Post Code" Name="PostCode" />
<ext:TextField ID="HomePhone" runat="server" FieldLabel="Home Phone" Name="HomePhone" />
<ext:TextField ID="TitleCourt" runat="server" FieldLabel="Title Of Courtesy" Name="TitleCourt" />
<ext:DateField ID="BirthDate" runat="server" FieldLabel="Birth date" Format="yyyy-MM-dd" Name="BirthDate" />
<ext:TextField ID="Region" runat="server" FieldLabel="Region" Name="Region" />
<ext:TextField ID="Country" runat="server" FieldLabel="Country" Name="Country" />
<ext:TextArea ID="Note" runat="server" FieldLabel="Note" Height="50" Name="Note" />
</Items>
</ext:FormPanel>
</Items>
<BottomBar>
<ext:PagingToolbar
runat="server"
DisplayInfo="true"
DisplayMsg="Displaying employees {0} - {1} of {2}"
EmptyMsg="No employees to display"
/>
</BottomBar>
</ext:TabPanel>
</Items>
</ext:Viewport>
</form>
</body>
</html>


Could you reproduce this issue using this sample?

Thanks.

Daniil
Apr 17, 2013, 9:51 AM
Thank you for the new details and new sample. I will get it a try.

softmachine2011
Apr 24, 2013, 10:10 AM
Hi,

Could you finally reproduce this issue?

Thanks.

softmachine2011
May 06, 2013, 1:47 PM
Hi again,

Any conclusion about this test sample or any feedback about this issue?

Thanks.

softmachine2011
May 13, 2013, 2:26 PM
Any answer??

Daniil
May 13, 2013, 4:17 PM
Apologize for the big delay.

I was hoping to provide you with any good news, but it is still the same. I can't reproduce memory leaking in IE9 using your sample.

Though, seems, Chrome and FireFox leaks.

softmachine2011
May 14, 2013, 10:10 AM
Hi,

It looks like we are performing something different as we all could reproduce this same issue directly against ExtJS samples, Ext.NET samples or compiling locally last Ext.NET trunk version.

It would be possible to see this issue together? using our environment or yours, enabling remote control, an inquiero connection or any other way you prefer...

We are open to any suggestion from yours.

Daniil
May 16, 2013, 12:24 PM
Please tell can you reproduce the issue with a page with no Stores (no Stores at all)?

softmachine2011
May 17, 2013, 12:19 PM
Hi again,

We will try the same sample without stores as soon as we can.

But now, running again this same example:

http://forums.ext.net/showthread.php?21063-OPEN-10-Memory-leaks‎&p=107164&viewfull=1#post107164

in a new machine with these new specifications:


IE 9.0.8112.16421 in Windows7 Ultimate Service Pack 1 (64bit)

We get these other results:

- Running Examples Explorer project directly from Visual Studio 2010: memory seems to always drops back down when we open & close a single Detail window several times. But if we open 10+ windows at a time, and then close all them, then we get a 3MB-4MB (aprox.) memory increase.

- Publishing this web project and running it from IIS 7: we get about 4MB memory increase each time we open & close a window. We get a clearer increase, opening 10+ windows and then closing them.

- Using Firefox: no matter what server we use to run the sample (VS or IIS), we can always reproduce this issue.


So it looks like you should reproduce this issue with IE, publishing Examples Explorer (applying this sample modifications) and openning several windows before close all them.

We will test now this same sample without stores, but we were waiting for your feedback too.

Regards.

softmachine2011
May 21, 2013, 3:51 PM
Hi,

Tested again with no stores at all. Same results than in previous post.

Here is our sample code:

Default.aspx


<%@ Page Language="C#" %>

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

<%@ Register src="WindowEditor.ascx" tagname="WindowEditor" tagprefix="uc1" %>

<!DOCTYPE html>

<html>
<head runat="server">
<title>Custom Window with Record Details - Ext.NET Examples</title>
<link href="/resources/css/examples.css" rel="stylesheet" />

<script>
var CompanyX = {
_index: 0,

getIndex: function () {
return this._index;
},

setIndex: function (index) {
if (index > -1) {
this._index = index;
}
},

edit: function (index) {
this.setIndex(index);
this.open();
},

next: function () {
this.edit(this.getIndex() + 1);
},

previous: function () {
this.edit(this.getIndex() - 1);
},

refresh: function () {
App.GridPanel1.getView().refresh();
},

open: function () {
var w = new Ext.Window({
closeAction: 'destroy',
renderTo: Ext.getBody(),
resizable: true,
maximizable: false,
minimizable: false,
collapsible: false,
draggable: true,
isMinimized: false,
isMaximized: false,
minWidth: 400,
minHeight: 400,
width: 460,
height: 460,
isModal: false,
constrain: true,
loader: {
url: 'Detail.aspx?idx=' + this.getIndex(),
renderer: 'frame',
disableCaching: true,
loadMask: {
showMask: true
},
listeners: {
load: function (control) {
control.target.iframe.dom.contentWindow.parentWind ow = control.target;
}
}
},
listeners: {
close: {
fn: function (el) {
el.destroy();
}
}
}
});

w.show();
}
};
</script>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />

<h1>Custom Window with Record Details</h1>

<p>For view/edit additional properties please click on the image in last column.</p>

<ext:GridPanel
runat="server"
ID="GridPanel1"
Title="Employees"
Height="200">
<TopBar>
<ext:Toolbar runat="server">
<Items>
<ext:Button runat="server" Icon="Pencil" StandOut="true">
<Listeners>
<Click Handler="CompanyX.edit(CompanyX.getIndex()+1);" />
</Listeners>
<ToolTips>
<ext:ToolTip runat="server" Html="Edit button" />
</ToolTips>
</ext:Button>
</Items>
</ext:Toolbar>
</TopBar>
<ColumnModel runat="server">
<Columns>
<ext:Column runat="server" Text="Full Name" DataIndex="LastName" Flex="1">
<Renderer Handler="return '<b>' + record.data['LastName'] + '</b>,' + record.data['FirstName']" />
</ext:Column>
<ext:Column runat="server" Text="Title" DataIndex="Title" Width="150">
<Editor>
<ext:TextField runat="server" />
</Editor>
</ext:Column>
<ext:DateColumn runat="server" Text="Birth Date" DataIndex="BirthDate" Format="yyyy-MM-dd">
<Editor>
<ext:DateField runat="server" Format="yyyy-MM-dd" />
</Editor>
</ext:DateColumn>
<ext:Column runat="server" Text="City" DataIndex="City" Width="100">
<Editor>
<ext:TextField runat="server" />
</Editor>
</ext:Column>
<ext:Column runat="server" Text="Address" DataIndex="Address" Width="250">
<Editor>
<ext:TextField runat="server" />
</Editor>
</ext:Column>
</Columns>
</ColumnModel>
<BottomBar>
<ext:PagingToolbar
runat="server"
DisplayInfo="true"
DisplayMsg="Displaying employees {0} - {1} of {2}"
EmptyMsg="No employees to display"
/>
</BottomBar>
</ext:GridPanel>

<uc1:WindowEditor ID="WindowEditor1" runat="server" />
</form>
</body>
</html>


Detail.aspx


<%@ Page Language="C#" %>

<%@ Import Namespace="Ext.Net.Examples.Northwind"%>

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

<!DOCTYPE html>

<html>
<head runat="server">
<title>Custom Window with Record Details - Ext.NET Examples</title>
<link href="/resources/css/examples.css" rel="stylesheet" />
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />

<ext:Viewport runat="server" Layout="BorderLayout" Border="false">
<Items>
<ext:Panel runat="server" Region="North" Border="false">
<TopBar>
<ext:Toolbar runat="server">
<Items>
<ext:SplitButton runat="server" Text="Menu Button" IconCls="add16">
<Menu>
<ext:Menu runat="server">
<Items>
<ext:MenuItem runat="server" Text="Menu Button 1" />
</Items>
</ext:Menu>
</Menu>
</ext:SplitButton>
<ext:ToolbarSeparator />
<ext:SplitButton runat="server" Text="Cut" IconCls="add16">
<Menu>
<ext:Menu runat="server">
<Items>
<ext:MenuItem runat="server" Text="Cut Menu Item" />
</Items>
</ext:Menu>
</Menu>
</ext:SplitButton>
<ext:Button runat="server" Text="Copy" IconCls="add16" />
<ext:Button runat="server" Text="Paste" IconCls="add16">
<Menu>
<ext:Menu runat="server">
<Items>
<ext:MenuItem runat="server" Text="Paste Menu Item" />
</Items>
</ext:Menu>
</Menu>
</ext:Button>
<ext:ToolbarSeparator />
<ext:Button runat="server" Text="Format" IconCls="add16" />
</Items>
</ext:Toolbar>
</TopBar>
<Items>
<ext:Toolbar runat="server">
<Items>
<ext:Button runat="server" Icon="Add">
<Listeners>
<Click Handler="Ext.Msg.alert('Click','Click on Add');" />
</Listeners>
<ToolTips>
<ext:ToolTip runat="server" Html="Simple button" />
</ToolTips>
</ext:Button>

<ext:Button runat="server" Icon="Accept">
<Listeners>
<Click Handler="Ext.Msg.alert('Click','Click on Accept');" />
</Listeners>
<ToolTips>
<ext:ToolTip runat="server" Html="Simple button" />
</ToolTips>
</ext:Button>

<ext:Button runat="server" Icon="Delete">
<Listeners>
<Click Handler="Ext.Msg.alert('Click','Click on Delete');" />
</Listeners>
<ToolTips>
<ext:ToolTip runat="server" Html="Simple button" />
</ToolTips>
</ext:Button>

<ext:ToolbarSeparator/>

<ext:Button runat="server" EnableToggle="true" ToggleGroup="Group1" Icon="GroupAdd" Pressed="true" />
<ext:Button runat="server" EnableToggle="true" ToggleGroup="Group1" Icon="GroupDelete" />
<ext:Button runat="server" EnableToggle="true" ToggleGroup="Group1" Icon="GroupEdit" />
</Items>
</ext:Toolbar>
</Items>
</ext:Panel>
<ext:TabPanel runat="server" Region="Center" Layout="FitLayout" Border="false">
<Items>
<ext:FormPanel
ID="CompanyInfoTab"
runat="server"
Title="Company Info"
Icon="ChartOrganisation"
DefaultAnchor="100%"
BodyPadding="5">
<Items>
<ext:TextField ID="EmployeeID1" runat="server" FieldLabel="Employee ID" Disabled="true" Name="EmployeeID" />
<ext:TextField ID="FirstName" runat="server" FieldLabel="First Name" Name="FirstName" />
<ext:TextField ID="LastName" runat="server" FieldLabel="Last Name" Name="LastName" />
<ext:TextField ID="Title" runat="server" FieldLabel="Title" Name="Title" />
<ext:ComboBox
ID="ReportsTo"
runat="server"
FieldLabel="Reports to"
AllowBlank="true"
DisplayField="LastName"
ValueField="EmployeeID"
TypeAhead="true"
QueryMode="Local"
Name="ReportsTo"
ForceSelection="true"
TriggerAction="All"
EmptyText="Select an employee...">
</ext:ComboBox>
<ext:DateField ID="HireDate" runat="server" FieldLabel="Hire date" Format="yyyy-MM-dd" Name="HireDate" />
<ext:TextField runat="server" ID="Extension" FieldLabel="Extension" Name="Extension" />
</Items>
</ext:FormPanel>
<ext:FormPanel
ID="PersonalInfoTab"
runat="server"
Title="Personal Info"
Icon="User"
DefaultAnchor="100%"
BodyPadding="5">
<Items>
<ext:TextField ID="EmployeeID2" runat="server" FieldLabel="Employee ID" Disabled="true" Name="EmployeeID" SubmitValue="false" />
<ext:TextField ID="Address" runat="server" FieldLabel="Address" Name="Address" />
<ext:TextField ID="City" runat="server" FieldLabel="City" Name="City" />
<ext:TextField ID="PostCode" runat="server" FieldLabel="Post Code" Name="PostCode" />
<ext:TextField ID="HomePhone" runat="server" FieldLabel="Home Phone" Name="HomePhone" />
<ext:TextField ID="TitleCourt" runat="server" FieldLabel="Title Of Courtesy" Name="TitleCourt" />
<ext:DateField ID="BirthDate" runat="server" FieldLabel="Birth date" Format="yyyy-MM-dd" Name="BirthDate" />
<ext:TextField ID="Region" runat="server" FieldLabel="Region" Name="Region" />
<ext:TextField ID="Country" runat="server" FieldLabel="Country" Name="Country" />
<ext:TextArea ID="Note" runat="server" FieldLabel="Note" Height="50" Name="Note" />
</Items>
</ext:FormPanel>
</Items>
<BottomBar>
<ext:PagingToolbar
runat="server"
DisplayInfo="true"
DisplayMsg="Displaying employees {0} - {1} of {2}"
EmptyMsg="No employees to display"
/>
</BottomBar>
</ext:TabPanel>
</Items>
</ext:Viewport>
</form>
</body>
</html>

As we stated in previous post, you should reproduce this issue with IE applying our sample code in Examples Explorer and publishing it using IIS. Then, just need to open several windows before close all them at once.

Could you confirm this?

Regards.

softmachine2011
May 27, 2013, 4:11 PM
Hi again,

Could you finally reproduce this issue?

Thanks.

Daniil
May 28, 2013, 7:22 AM
I shared the example here.
http://examples2.ext.net/#/GridPanel/Miscellaneous/Details_Window_Test_Memory_Leaking/

Seems I am able to reproduce memory leaking in IE9.

My steps are:
1. Click a column command of rows => Windows open
2. Close the opened Windows

I will try to narrow the problem.

Also it appears to be reproducible with FireFox. I was able to reproduce it with pure ExtJS in FireFox (but not in IE9) and reported here:
http://www.sencha.com/forum/showthread.php?264618

softmachine2011
May 28, 2013, 9:04 AM
Hi again,

Also reproduced in IE with your sample and more or less with the same results:

1. An small memory increase opening & closing a single window.
2. A significant memory increase opening several windows at a time before close them.

No matter if stores are present or not, it looks an ExtJS memory leak problem related with iframes.

Regards.

Daniil
May 29, 2013, 8:01 AM
I have simplified your sample a lot and, finally, got a very simple test case which reproduces memory leaking for me.

Environment

1. Browsers: IE9, FireFox and Chrome
2. Windows 7 SP1 64bit
3. I run the sample with VS 2012 with its ASP.NET Development Server
4. The latest Ext.NET from the SVN trunk (today, 4.2.1 release included)

The steps are:

1. Clicks the button 10 times (more clicks more leaking)
2. Close all the Windows

The results on my machine are:


IE9 with "disableCaching: true": 128 MB => 137 MB
IE9 without "disableCaching: true": 118 MB => 202 MB
FireFox (FireBug disabled) with "disableCaching: true": 312 MB => 436 MB (wait a bit, FireFox slowly releases memory)
FireFox (FireBug disabled) without "disableCaching: true": 366 MB => 430 MB (wait a bit, FireFox slowly releases memory)
Chrome with "disableCaching: true": 83 MB => 167 MB
Chrome without "disableCaching: true": 84 MB => 159 MB


Here is a test case, the parent and child pages.

Default.aspx (parent)

<%@ Page Language="C#" %>

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

<!DOCTYPE html>
<html>
<head runat="server">
<title>Ext.NET Examples</title>

<script>
var count = 0;

var open = function (index) {
new Ext.Window({
closeAction: 'destroy',
loader: {
url: 'Detail.aspx?idx=' + index,
renderer: 'frame'
//, disableCaching: true // if uncomment, memory still leaks, but less
}
}).show();
};
</script>
</head>
<body>
<ext:ResourceManager runat="server" />

<ext:Button runat="server" Text="Open" Handler="open(count++);" />
</body>
</html>


Detail.aspx

<%@ Page Language="C#" %>

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

<!DOCTYPE html>
<html>
<head runat="server">
<title>Ext.NET Example</title>
</head>
<body>
<ext:ResourceManager runat="server" />
</body>
</html>

Next step

I will try to reproduce it with pure ExtJS.

EDIT by Daniil

I just tried with this Detail.aspx

Detail.aspx 2 (with raw ExtJS)

<%@ Page Language="C#" %>

<!DOCTYPE html>
<html>
<head runat="server">
<title>Ext.NET Example</title>

<script src="resources/js/ext-all-debug.js"></script>
</head>
<body>
</body>
</html>

The result are below. So, they are pretty much the same.



IE9 with "disableCaching: true": 50 MB => 61 MB
IE9 without "disableCaching: true": 43 MB => 60 MB
FireFox (FireBug disabled) with "disableCaching: true": 367 MB => 403 MB (wait a bit, FireFox slowly releases memory)
FireFox (FireBug disabled) without "disableCaching: true": 382 MB => 402 MB (wait a bit, FireFox slowly releases memory)
Chrome with "disableCaching: true": 64 MB => 154 MB
Chrome without "disableCaching: true": 82 MB => 174 MB

Daniil
Jun 03, 2013, 7:26 AM
I think I have reproduced the same with a pure ExtJS test case. Reported here:
http://www.sencha.com/forum/showthread.php?265047

Let's wait Sencha will confirm it or not.

Daniil
Jun 04, 2013, 4:56 AM
I think I have reproduced the same with a pure ExtJS test case. Reported here:
http://www.sencha.com/forum/showthread.php?265047

Let's wait Sencha will confirm it or not.

They opened a bug. It is a bit of success.

I reported another issue related to memory leaking. It leaks if reload a Store.
http://www.sencha.com/forum/showthread.php?265051

As a summary, there are now three opened bug tickets related memory leaking (two with iframes).
http://www.sencha.com/forum/showthread.php?264618
http://www.sencha.com/forum/showthread.php?265047
http://www.sencha.com/forum/showthread.php?265051

Hopefully, Sencha will consider these bugs as severe ones.

softmachine2011
Jun 05, 2013, 1:23 PM
Thanks @Daniil and Ext.NET team for your kind support following and reproducing this issue.

We hope Sencha will consider this an important bug and try to solve it as soon as possible, as we are dealing with this problem from September 2012.

Due to this bug we'd worked all this time with two development lines, one stopped to market as we can't launch any new release with Ext.NET 2.X version.

We have not any comercial relation with Secha, so we hope you could deal this issue directly with Sencha folks as close as you can.

Any information Sencha could provide about an estimated date would be extremely useful for us in order to know how we must proceed in a near future.

Kind regards and thanks again.

Daniil
Jun 05, 2013, 2:51 PM
Yes, we will deal with Sencha as closer as possible, regarding this issue.

Honestly, it is a big leap that now we have three opened bugs regarding this issue. It means that, at least, one member of Sencha team (@slemmon) reproduced and consider it as a bug.

Thank you very much for all your patience and understanding.

softmachine2011
Jun 20, 2013, 4:21 PM
Hi again,

Is there any place to see what is the current status of these bugs?

Is there any way to know an estimated date?

Thanks.

Daniil
Jun 21, 2013, 4:55 AM
Unfortunately, Sencha keeps silence. I bumped the threads.
http://www.sencha.com/forum/showthread.php?265047#post975819
http://www.sencha.com/forum/showthread.php?265051#post975820

ArslanA
Aug 29, 2013, 9:43 AM
Dear Daniil,

Could you please try to reach Sencha again?

Concerning Ext.NET we are at cross roads right now. In the current situation being based on Sencha Ext JS affects you badly too. Right now we are reverting all our Ext.NET development efforts (which cost us dearly) back. The next step on our side will to find alternatives Ext.NET and use them instead, but before going that road we would really like to stay on the course we have currently invested ourselves in.

So please, any information you can get from Sencha will go great lengths at keeping your current customers!

Best Regards,
Arslan Arslan
LOGO Business Solutions.

anup
Aug 30, 2013, 9:29 AM
@ArslanA

I sympathise with your situation - Sencha has often been difficult to get timely responses from, I find. However, I wonder if this issue can be tackled from another perspective:

I appreciate this is not trivial, but would it be worth the effort to revisit your iframe approach - try to load Ext.NET components dynamically during an AJAX request, or through Direct Events instead of loading iframes? It may help provide an even slicker experience for your end users while by-passing some of the memory leak issues?

Although it does seem Sencha has a memory leak issue with iframes, even if that is sorted out, or you switch to another framework altogether, heavy use of iframes could still be an isuse. For example,



The browser itself will still have to manage many iframes, which will still require more memory;
Your pages might have to download more HTML/CSS/JavaScript than necessary (not always) and you may need to end up writing iframe cross communication code which can be annoying/messy (though Ext.NET's message bus may help I suppose);
If your iframe contents are creating more Ext.NET based pages, various Ext.NET/Ext JS initialization will need to occur again, and possibly re-download script already downloaded in the main frame (though caching of course helps, but doesn't take away browser parsing/processing/interpreting of such scripts).


In an app I work on in my workplace, we have a mix of loading iframes in tabs/windows and dynamically loading Ext.NET components during AJAX requests and insert them into tabs/windows during AJAX requests, DirectMethods and DirectEvents, etc. The latter is far slicker. The only reason we still have those iframes-based approaches is they are very time consuming to convert into Ext.NET components (complex functionality and low priority) but we definitely want to do it (and have started to do so).

I also sympathise with your feeling to consider another solution - but the weeks/months of work using a different library and migrating everything across, could that similar effort be spent in not relying on iframes in first place? (I know, it is easy for me to say it here but I know it is hard to do in reality. Even in my example above we have challenges in converting some iframe-based pages into components - mostly a time constraint though...!)

All that being said, I do hope Sencha can solve this soon, because our giant app at work is still 1.x and while we have approval to migrate to 2.x we haven't prioritised it yet, but this would be a potential issue for us, too.

Hope that helps in some way :)

Daniil
Aug 30, 2013, 11:51 AM
Anup, thank your attention and the very valuable response!

Hi @ArslanA,

Unfortunately, we have no information about this issue from Sencha unless the info which is already in the forum thread. Well, the info is very limited - they opened a bug ticket which probably means they consider it a bug. That's it. As everybody, I do not understand why they keep silence ignoring all the complaints including the ones from their own premium members. This bug looks very severe, making ExtJS 4 unusable if iframes are required in an application.

We are so sorry that we cannot get rid of that problem in Ext.NET. I do understand, you don't need our apologies, but, unfortunately, we can't provide more at the moment.

softmachine2011
May 22, 2014, 8:52 AM
Hi,

Taking up this issue again, did you know if iframe's memory leak problems could be solved with the brand new EXT.JS 5.0 version?

Hope you could check this problem with newer available version and give us some light about this ancient issue.

Tanks again and kind regards.

Daniil
May 22, 2014, 5:48 PM
Yes, it is a good suggestion to test it with ExtJS 5. Thank you. I will do that.

softmachine2011
Jul 11, 2014, 7:54 AM
Hi again,

Could you finally test this issue with ExtJS 5?

Could this problem be tested with current Ext.NET 3 version? or should it be tested directly with ExtJS 5?

Thanks again for your king support.

Daniil
Jul 11, 2014, 3:48 PM
Could you finally test this issue with ExtJS 5?

No. I wait Ext.NET v3.


Could this problem be tested with current Ext.NET 3 version?

Yes, it could be, but Ext.NET v3 is not ready yet.


or should it be tested directly with ExtJS 5?

If the problem is reproducible with Ext.NET v3, I will test with the raw ExtJS 5.

Daniil
Oct 10, 2014, 11:18 AM
It appears the issue is still reproducible with ExtJS 5 and, therefore, in Ext.NET v3.

I've posted an update in the Sencha forum thread.
http://www.sencha.com/forum/showthread.php?265047&p=1070368&viewfull=1#post1070368

softmachine2011
Oct 13, 2014, 11:21 AM
Thanks @Daniil,

We have tested it directly with ExtJS 5 and it looks like we get better results than with ExtJS 4.2. Anyway, it still remains a residual memory leak for every iframe.

At this point, we will consider all our alternatives in order to upgrade our application to a newer versi?n.


Thanks again for your kind support.

anup
Oct 27, 2014, 5:37 PM
Just reading your post on the Sencha forum, Daniil.

There's a lot of silence and many others voicing concern about the issue (and about the silence!)

I wonder, is it worth creating a separate ticket just for 5.x part of their forum? Maybe they will look at those ones more urgently?

Daniil
Nov 24, 2014, 3:04 PM
Thank you for the suggestion.


Maybe they will look at those ones more urgently?

I would bet they won't:)

We (Ext.NET) are probably not going to re-report it again for ExtJS 5. Though, you are totally free to do that if you want. Maybe, it will produce some effect indeed.

Currently, I have something to add on this topic. I tested it with a big, but fake JavaScript file and noticed pretty much the same (or comparable, at least) results as it is with the original ExtJS files. Here is a small retrospective story.

We deal with that iframes memory leaking problem quite a long time. I and others always had issues with testing and reproducing that problem. Often (or just always) the testing results depended on the version of browser and/or OS. Someone had some results in IE9 on his machine, but other person had very different results in IE9 on his machine. The same situation with Chrome and FireFox. And, also, with exact OS version.

Personally, I tested it a lot and I often had different results. For example, I initially tested with some browser and reproduced a big memory leak. Then I tested it in a few months and noticed that the situation improved a lot. Sometimes I even could not reproduce memory leaking at all and was happy that the problem is gone:) Until a next person reported the problem again that led me to retest and reproduce it again. Sure, it is quite easy to realize that the conditions of each testing cycle are always changed - the browsers and OS get their updates. It led me to think that it is very probable that ExtJS is not so a culprit of the problem and, maybe, browsers, their GC and, maybe, even OS are the main culprit.

Recently, I gave that problem another chance and tested, tested, tested. With all ExtJS - 3, 4 and 5. I don't remember that anyone has reported that problem with Ext.NET v1 (i.e. ExtJS 3), but I tried to test and saw that it is also reproducible with ExtJS 3, but in a much less extent than it is with ExtJS 4.

I asked myself what could be the difference between ExtJS 3 and 4 that leads that degradation? I thought like "Hmm, ExtJS 4 JavaScript and CSS are much bigger than ExtJS 4 and 5. Maybe, I should think about it more". It results in a thought to test it with some big JavaScript file, but a fake file. I generated a .js file like this:


var someNamespace = {};
SomeNamespace.someLongNameJustToIncreaseSpace0 = function() { var a, b, c, d; }
SomeNamespace.someLongNameJustToIncreaseSpace1 = function() { var a, b, c, d; }
SomeNamespace.someLongNameJustToIncreaseSpace2 = function() { var a, b, c, d; }
...
SomeNamespace.someLongNameJustToIncreaseSpaceN = function() { var a, b, c, d; }


Up to ~5 MB, for example.

While testing I noticed that I see pretty much the same (or comparable, at least) results that I see with the original ExtJS files. Also, the bigger file, the bigger memory consumption.

Yes, it still looks like ExtJS files consumes more memory. But it might be because of his complexity. At least, partially. I would assume if make a fake file more complex, then it might result in a bigger memory consumption.

Yes, it doesn't prove for 100% that there is no memory leaking in the ExtJS or Ext.NET JavaScript. I would still assume there is some. But now I am quite confident that the main (or, at least, one of the main) problem is the size of the ExtJS and Ext.NET files and the fact that the browsers' Garbage Collecting is not ideal with iframes and big JavaScript files.

How could we decrease the size of ExtJS or Ext.NET files? I would say nohow.

How could we improve the situation with browsers? Well, we probably should try to report it to Microsoft, Mozilla and Google and hope we will agree and do something. If somebody reports it to them, we would appreciate a lot. Maybe, we will report by our own at some point.

I should also note that with the current cycle of testing I didn't deal with FireFox, because I see memory problems in the last versions. With the last updates (it started a month ago or so) then I just serf the Internet via FireFox, I might finally notice that my system slows down and there is something like 1 or 1.5 GB of memory consumed by the FireFox process in the Task Manager. So, this time I tested with IE10 and Chrome only. On Windows 7 64 bit with all the updates.

Finally, I want to share a test case. Maybe, somebody wants to give it a try a well.

I usually ran a test during 5-10 minutes or so. I also tried to leave it for ~1 hour or so and, by the way, I have not been able to reproduce a "shutting down" memory leaking. I mean the browsers never hung up, because the memory consumption never didn't grow extremely. I would say it was always appropriate for me.

Parent

<!DOCTYPE html>
<html>
<head>
<title>Memory leaks</title>

<script>
var counter = 0,
iframe;

var createIFrame = function (index) {
var url = 'Child_fake_big_file.htm?index=' + index,
iframe = document.createElement("iframe");

document.body.appendChild(iframe);
iframe.src = url;

return iframe;
};

var startTask = function() {
iframe[iframe.remove ? "remove" : "removeNode"](); // non-IE or IE
iframe = createIFrame(counter++);
};
</script>
</head>
<body>
<input type="button" value="Start test task" onclick="iframe = createIFrame(counter++); setInterval('startTask()', 3000);" />
</body>
</html>


Child

<!DOCTYPE html>
<html>
<head>
<title>Child</title>

<script src="ExtJS or fake file goes here.js"></script>
</head>
<body>
Hello from iframe!
</body>
</html>

fake.js (up to 5MB or so)

var someNamespace = {};
SomeNamespace.someLongNameJustToIncreaseSpace0 = function() { var a, b, c, d; }
SomeNamespace.someLongNameJustToIncreaseSpace1 = function() { var a, b, c, d; }
SomeNamespace.someLongNameJustToIncreaseSpace2 = function() { var a, b, c, d; }
...
SomeNamespace.someLongNameJustToIncreaseSpaceN = function() { var a, b, c, d; }