PDA

View Full Version : Memory issue



webfriend13
1 Apr 2012, 5:51 PM
Hi all,

I have following issues in my application:

1) How can we check which part of code is taking time to render and why?
2) Why the consumption of memoey is too high in the browser? After a point the memory consumption keep going up and goes upto 1.6 GB from 300 MB. How can I check which section of code is consuming memory and how to clear it?
3) Please suggest tools and links which would help me resolve these performance issues.

Thanks in advance

skirtle
1 Apr 2012, 6:06 PM
ExtJS 4.1 (currently in RC) comes with a page analyzer tool. That can be useful for finding problems. 4.1 has much better performance than 4.0.7 so you may wish to try it in your application if you haven't already. The usual caution around using an RC build obviously applies.

The tools built into Chrome can be useful for finding performance problems and memory leaks, though they take some getting used to.

For IE, sIEve is a very useful tool for finding leaks.

A couple of simple tricks that can help you to find leaks in all browsers:

Inspect the DOM for your pages. Check everything is as expected. Make sure there aren't hidden elements building up that shouldn't be there.
Check the contents of Ext.ComponentManager. All components are registered with the manager on creation and are only removed when they are destroyed. If the manager is keeping a reference then the component can't be garbage collected. There could easily be hundreds of components in there so as an initial sweep I'd just try watching the total count. If it keeps going up and up then you've got a leak.

webfriend13
1 Apr 2012, 6:28 PM
ExtJS 4.1 (currently in RC) comes with a page analyzer tool. That can be useful for finding problems. 4.1 has much better performance than 4.0.7 so you may wish to try it in your application if you haven't already. The usual caution around using an RC build obviously applies.

The tools built into Chrome can be useful for finding performance problems and memory leaks, though they take some getting used to.

For IE, sIEve is a very useful tool for finding leaks.

A couple of simple tricks that can help you to find leaks in all browsers:
Inspect the DOM for your pages. Check everything is as expected. Make sure there aren't hidden elements building up that shouldn't be there.
Check the contents of Ext.ComponentManager. All components are registered with the manager on creation and are only removed when they are destroyed. If the manager is keeping a reference then the component can't be garbage collected. There could easily be hundreds of components in there so as an initial sweep I'd just try watching the total count. If it keeps going up and up then you've got a leak.



Hi Skirtle,

Thank you for quick reply. I am using ExtJs 4.0.7 & I am not sure if I can switch to 4.1 framework. I will try to use the tools you have mentioned. I am sure memory is leaking as the memory consumption of my page is only increasing.