Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 15-01-2009
Member
 
Join Date: Nov 2008
Posts: 23
GWT memory management

The question for the guru of Google Web Toolkit : "How to write GWT code that does not receive a continuous flow of memory for IE?" We have a medium-sized application (~ 10-15 s). The problem is that working with the application in IE, the browser is always using more and more memory. In doing so, it either does not relieve the memory, or are not fully exempt. It was observed this fact: when you click refresh, IE frees all memory, and returns to the indicators that were at the opening page.

Reached the point that we write a simple test: to create the panel, adding to it a few thousand different standard components (buttons, checkbox text boxes, etc.), then we add this panel in RootPanel, and remove it from there. When creating and adding to the panel RootPanel, the browser further alotsiruet ~ 5 MB of memory, after the removal of the panel relieve ~ 4.8 MB. Ie for each cycle is not relieved order 200KB. In the test does not use Event-s, listeners, DOM class, there is no native methods. Neither Microsoft js memory leaks detector, does not show memory leaks in javascript, but the fact remains that, after 20 minutes, the repetition of cycles of testing, the browser is the addition of 10 to 15 MB of memory.

Who face similar problems and knows how to solve them the way your help would be useful
Reply With Quote
  #2  
Old 15-01-2009
Member
 
Join Date: May 2008
Posts: 115
Re: GWT memory management

you would at least lead code and the version of GWT raised. In GWT 1.4 I have a fairly complex application with a similar not experienced, but the leakage was not significant.
Reply With Quote
  #3  
Old 15-01-2009
Member
 
Join Date: Nov 2008
Posts: 23
Re: GWT memory management

Yes GWT 1.5.2. We have leaks, too small at first, but considering that the application runs without rebooting and has an Entry Point, over time, after intensive work leaks are visible.
Reply With Quote
  #4  
Old 15-01-2009
Member
 
Join Date: Jan 2008
Posts: 1,515
Re: GWT memory management

Quote:
Originally Posted by Protector View Post
The question for the guru of Google Web Toolkit : "How to write GWT code that does not receive a continuous flow of memory for IE?" We have a medium-sized application (~ 10-15 s). The problem is that working with the application in IE, the browser is always using more and more memory. In doing so, it either does not relieve the memory, or are not fully exempt. It was observed this fact: when you click refresh, IE frees all memory, and returns to the indicators that were at the opening page.

Reached the point that we write a simple test: to create the panel, adding to it a few thousand different standard components (buttons, checkbox text boxes, etc.), then we add this panel in RootPanel, and remove it from there. When creating and adding to the panel RootPanel, the browser further alotsiruet ~ 5 MB of memory, after the removal of the panel relieve ~ 4.8 MB. Ie for each cycle is not relieved order 200KB. In the test does not use Event-s, listeners, DOM class, there is no native methods. Neither Microsoft js memory leaks detector, does not show memory leaks in javascript, but the fact remains that, after 20 minutes, the repetition of cycles of testing, the browser is the addition of 10 to 15 MB of memory.

Who face similar problems and knows how to solve them the way your help would be useful
Try to create a smaller interface, instead of creating new elements, try to replace the contents of the old.
Reply With Quote
  #5  
Old 15-01-2009
Member
 
Join Date: Feb 2008
Posts: 1,848
Re: GWT memory management

Quote:
Originally Posted by Protector View Post
The question for the guru of Google Web Toolkit : "How to write GWT code that does not receive a continuous flow of memory for IE?" We have a medium-sized application (~ 10-15 s). The problem is that working with the application in IE, the browser is always using more and more memory. In doing so, it either does not relieve the memory, or are not fully exempt. It was observed this fact: when you click refresh, IE frees all memory, and returns to the indicators that were at the opening page.

Reached the point that we write a simple test: to create the panel, adding to it a few thousand different standard components (buttons, checkbox text boxes, etc.), then we add this panel in RootPanel, and remove it from there. When creating and adding to the panel RootPanel, the browser further alotsiruet ~ 5 MB of memory, after the removal of the panel relieve ~ 4.8 MB. Ie for each cycle is not relieved order 200KB. In the test does not use Event-s, listeners, DOM class, there is no native methods. Neither Microsoft js memory leaks detector, does not show memory leaks in javascript, but the fact remains that, after 20 minutes, the repetition of cycles of testing, the browser is the addition of 10 to 15 MB of memory.

Who face similar problems and knows how to solve them the way your help would be useful
Here, two problems:
  1. Fragmentation Heap.
  2. Circular references.

Fragmentation Heap has gradually led to an increase in his memory. The second problem - this is cyclical links that cause the diversion of COM-objects. GWT can pull them, but this requires a transition between pages
Reply With Quote
  #6  
Old 15-01-2009
Member
 
Join Date: Jan 2008
Posts: 1,515
Re: GWT memory management

Quote:
Originally Posted by MindSpace View Post
Here, two problems:
  1. Fragmentation Heap.
  2. Circular references.

Fragmentation Heap has gradually led to an increase in his memory. The second problem - this is cyclical links that cause the diversion of COM-objects. GWT can pull them, but this requires a transition between pages
In general, the first problem is quite simple - if we create and remove a lot of objects in the contiguous block of memory that are used for the distribution of these objects, we can show "holes."

The second problem - complicated. All GUI-objects and DOM nodes in IE represented as COM-objects. A COM-e is counting links. And if you make a series of objects, using reference-counting, they will live forever.
Reply With Quote
  #7  
Old 15-01-2009
Member
 
Join Date: Nov 2005
Posts: 1,323
Re: GWT memory management

Try this article as a starting point in understanding IE memory leaks. Internet Explorer is far worse than other browsers in memory managment.

http://msdn.microsoft.com/en-us/library/bb250448.aspx

If your application uses "pure" GWT you will be somewhat protected from leaks, but perhaps you have some native methods that employ function closures (by far the easiest way to incur major leaks).
Reply With Quote
  #8  
Old 15-01-2009
Member
 
Join Date: Nov 2008
Posts: 23
Re: GWT memory management

Considering the natives, we have prepared test application, where weexclude all natives, DOM class method calls, and even eventListeners. Sometimes browser frees some memory, but not all (after memory release, total browser's memory allocation is greater then before allocation).
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "GWT memory management"
Thread Thread Starter Forum Replies Last Post
memory management is not proper in Motorola Droid x2 Kungfu Pandey Portable Devices 2 19-01-2012 12:19 PM
How to improve SQL Server memory management Tylerrr Software Development 5 13-02-2010 02:20 AM
Need memory management tools for windows XP Akiraa Windows Software 5 31-01-2010 03:29 AM
Memory allocation and management AdityaR Software Development 4 22-01-2010 08:42 PM
Python Memory management fastrod Software Development 5 21-03-2009 01:26 PM


All times are GMT +5.5. The time now is 09:24 AM.