Urgent!!!!!!!!!!!!!!!!!!!!!!!!!!! GWT 2 Memory leak

100 views
Skip to first unread message

tarik

unread,
Jul 6, 2010, 5:12:44 AM7/6/10
to Google Web Toolkit
Dear Sir,
We are developing an application using GWT, this application is very
heavy of widgets, we are using a datatable that is developed in
JQuery. We are suffering from a big memory leak. I did not find yet a
way to resolve this problem can anyone help me please. The problem we
have is that the memory on the hosted machine keeps increasing all the
time. Can you please propose anyway to decrease the consumption of
memory on my application? Please it is an urgent matter.
neeeeeeeeeeeeeeeeeeeeeeeed
help!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

metrixon

unread,
Jul 6, 2010, 8:40:07 AM7/6/10
to Google Web Toolkit
First of all: "DON'T PANIC" - the possibility of a good answer does
not correlate with the number of exclamation marks used in the subject
or text.

Now concerning your problem:
your problem description is very vague - essentially you are saying:
"my application does not work - tell me how to fix it". If the memory
consumption increases on the machine that is hosting your application,
the problem has nothing to do with GWT at all, since all the
javascript code is generated at compile time and executed on the
client side (in the browser).
Your description indicates that your server side code is leaking
memory. The best way to fix this problem is to thoroughly analyse your
application's runtime behaviour by profiling the application with
tools like JProfiler, Yourkit or the NetBeans Profiler.

Daniel Le Clere

unread,
Jul 6, 2010, 9:16:06 AM7/6/10
to Google Web Toolkit
Use the new data table widget in gwt 2.1 M2

tarik kandil

unread,
Jul 6, 2010, 9:53:34 AM7/6/10
to google-we...@googlegroups.com
when I am testing my application on IE6, the problem that I find, is that the memory consumption keeps increasing. The same thing for Firefox. Besides, I apologize because my web application is running but once  I click too many times the memory increases and it crashes. Can you please tell me how I can fix this? Thank you in advance. I am using a data table that has been developed in JQuery. And it seems that when I go to another page My application still references the same datatable. I want to know if there exist a way to delete all the doms and divisions that every time I create my table. If there exist any methods that I can add on the unload method when I detach my widget. Honestly it is an urgent matter, can you help me please? Thank you.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
Tarik Kandil
Consultant Informatique

tarik kandil

unread,
Jul 6, 2010, 11:22:04 AM7/6/10
to google-we...@googlegroups.com
Can you tell me the name of the new datatable in this version? thank you

On Tue, Jul 6, 2010 at 1:16 PM, Daniel Le Clere <daniel....@gmail.com> wrote:
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Matthias Groß

unread,
Jul 6, 2010, 1:45:34 PM7/6/10
to Google Web Toolkit
Hi,

I doubt that you will get any definite answers if you don't provide a
more thorough analysis of your problem.

Generally just try to release all references to heavy-weight objects
you don't need anymore as soon as possible. This holds true especially
for global instances, e.g. singletons.
If that doesn't help consider using weak references (see
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ref/WeakReference.html).

/Matthias

P.S.:
Also use less exclamation marks please.

Marcus Vinícius Bastos de Andrade

unread,
Jul 6, 2010, 2:03:47 PM7/6/10
to google-we...@googlegroups.com
Hello there, 

Executing locally my project, after a long time of browser refreshs of my application, the Jetty freezes.
I have identified that is a memory leak problem of Jetty, then I've added the following VM args to my pom.xml

<plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>gwt-maven-plugin</artifactId>
                <configuration>
                    <runTarget>${gwt.runtarget.html}</runTarget>
                    <extraJvmArgs>
-server -Xms1024m -Xmx1024m -XX:MaxPermSize=512m -XX:ParallelGCThreads=20 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:SurvivorRatio=8 -XX:TargetSurvivorRatio=75 -XX:MaxTenuringThreshold=0 -XX:+AggressiveOpts -XX:-TraceClassUnloading -Dsun.io.useCanonCaches=false -Dsun.net.client.defaultConnectTimeout=60000 -Dsun.net.client.defaultReadTimeout=60000
                     </extraJvmArgs>
....

I hope that works for you ;)

best regards


2010/7/6 Matthias Groß <f0r7...@googlemail.com>
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
Marcus Vinícius Bastos de Andrade
http://twitter.com/mynameisflaw
+55 31 9823-3606

Olivier

unread,
Jul 6, 2010, 10:49:53 AM7/6/10
to Google Web Toolkit
Hi,

We get the same issue in our application, lots of widget many refresh
of content, add and remove widget.
Usualy we noticed that we kept widget in a list as a member of a
composite.
When the composite was removed the list stay in memory, so to solve
the problem we implement a cleaning method overriding the onUnload()
method called by GWT framework.

regards

Olivier

On Jul 6, 9:53 am, tarik kandil <tarikkan...@gmail.com> wrote:
> when I am testing my application on IE6, the problem that I find, is that
> the memory consumption keeps increasing. The same thing for Firefox.
> Besides, I apologize because my web application is running but once  I click
> too many times the memory increases and it crashes. Can you please tell me
> how I can fix this? Thank you in advance. I am using a data table that has
> been developed in JQuery. And it seems that when I go to another page My
> application still references the same datatable. I want to know if there
> exist a way to delete all the doms and divisions that every time I create my
> table. If there exist any methods that I can add on the unload method when I
> detach my widget. Honestly it is an urgent matter, can you help me please?
> Thank you.
>
> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsu...@googlegroups.com>
> > .

tarik kandil

unread,
Jul 6, 2010, 7:52:28 PM7/6/10
to google-we...@googlegroups.com
Can you tell me what you have implemented in this methode please, can you show me the methode implementation, thank you.

To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

tarik kandil

unread,
Jul 6, 2010, 8:15:59 PM7/6/10
to google-we...@googlegroups.com
First, I would like to mention that I am using GWT2.0. I have a problem in a data table that I have developed using JQuery, I have many widgets, and I am using gwittir binding. Besides, I am using bindable collection in my datatable. After analysing my application, I found that there are some elements that are not deleted in IE6. Also, the memory keeps incrceasing all the time. Even if i change to a new page or i refresh the memory keeps increasing when i filtre or go to another page or I do any action(memory leak). Can you please tell me how to avoid the increasing of the memory through the whole application, add methods to delete elements when i go from page to page, or something like this. Thank you in advance. 

2010/7/6 Matthias Groß <f0r7...@googlemail.com>
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Stefan Bachert

unread,
Jul 7, 2010, 11:08:00 AM7/7/10
to Google Web Toolkit
Hi,

IE are known to have memory leaks. There is not much GWT can do .
You can avoid to create and delete DOM-elements. Try to reuse them.
Thats the best you can do with IE.
Or convince your customer to use a modern browser like Safari/Chrome/
Firefox.

Stefan Bachert
http://gwtworld.de

On 6 Jul., 15:53, tarik kandil <tarikkan...@gmail.com> wrote:
> when I am testing my application on IE6, the problem that I find, is that
> the memory consumption keeps increasing. The same thing for Firefox.
> Besides, I apologize because my web application is running but once  I click
> too many times the memory increases and it crashes. Can you please tell me
> how I can fix this? Thank you in advance. I am using a data table that has
> been developed in JQuery. And it seems that when I go to another page My
> application still references the same datatable. I want to know if there
> exist a way to delete all the doms and divisions that every time I create my
> table. If there exist any methods that I can add on the unload method when I
> detach my widget. Honestly it is an urgent matter, can you help me please?
> Thank you.
>
> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsu...@googlegroups.com>
> > .

lineman78

unread,
Jul 7, 2010, 8:46:51 PM7/7/10
to Google Web Toolkit
If it is an obvious problem in your code, you should be seeing memory
leaks in all browsers(which I believe you said you have). If that is
the case, you should be able to use the Speed Tracer plugin for
chrome. It tells you how many instances of which objects are being
created so that you can try and debug where you are holding a
reference to the object. Remember, in javascript there is no concept
of weak or soft references, so you have to be holding on to an object
somewhere in the DOM in order for there to be a memory leak. A memory
leak is not something that people here will be able to help you solve
directly, we can only give you pointers on ways to narrow down the
search. Also, if you are using flash, it is a common source of memory
leaks and it would explain the leaks persisting beyond the single
page(this could also be explained by a Java applet because only one
JVM is used throughout the entire browser).

On Jul 6, 6:15 pm, tarik kandil <tarikkan...@gmail.com> wrote:
> First, I would like to mention that I am using GWT2.0. I have a problem in a
> data table that I have developed using JQuery, I have many widgets, and I am
> using gwittir binding. Besides, I am using bindable collection in my
> datatable. After analysing my application, I found that there are some
> elements that are not deleted in IE6. Also, the memory keeps incrceasing all
> the time. Even if i change to a new page or i refresh the memory keeps
> increasing when i filtre or go to another page or I do any action(memory
> leak). Can you please tell me how to avoid the increasing of the memory
> through the whole application, add methods to delete elements when i go from
> page to page, or something like this. Thank you in advance.
>
> 2010/7/6 Matthias Groß <f0r7y....@googlemail.com>
>
>
>
> > Hi,
>
> > I doubt that you will get any definite answers if you don't provide a
> > more thorough analysis of your problem.
>
> > Generally just try to release all references to heavy-weight objects
> > you don't need anymore as soon as possible. This holds true especially
> > for global instances, e.g. singletons.
> > If that doesn't help consider using weak references (see
> >http://java.sun.com/j2se/1.4.2/docs/api/java/lang/ref/WeakReference.html).
>
> > /Matthias
>
> > P.S.:
> > Also use less exclamation marks please.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-we...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsu...@googlegroups.com>
> > .
Reply all
Reply to author
Forward
0 new messages