Results 1 to 8 of 8

Thread: GWT memory management

  1. #1
    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

  2. #2
    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.

  3. #3
    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.

  4. #4
    Join Date
    Jan 2008
    Posts
    1,521

    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.

  5. #5
    Join Date
    Feb 2008
    Posts
    1,852

    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

  6. #6
    Join Date
    Jan 2008
    Posts
    1,521

    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.

  7. #7
    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).

  8. #8
    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).

Similar Threads

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

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,890,161.48660 seconds with 17 queries