Re: Browser memory usage grows

2009-06-12 Thread David

Hi,

In the general case GWT's design guards against common JS pitfalls
that cause memory leaks.

There are a few known issues though:
When you use IFrames that memory is never decently released after
removing the IFrame.
The FormPanel can also leak.

IE6/IE7 are also consuming a huge amount of memory (half a megabyte
per image sometimes) if you use ImageBundles.
That is caused by the AlphaLoader trick they use to support
transparent PNGs in IE6.
I disabled this trick for IE7 and now everything runs a lot smoother.

All other memory leaks are possible plain old Java leaks caused by not
cleaning up or releasing references to objects in you application (so
your fault!)

David

On Fri, Jun 12, 2009 at 1:41 AM, Craig Sprycraig.s...@gmail.com wrote:
 Hello All,
 We've built an application using GWT 1.5.4 that calls a json server and the
 memory usage for the browser that it is running in keeps going up, I've
 tested this in IE, Firefox and Chrome with the same result.  This
 application is a widget based application, we have a map widget(open street
 maps) and some list widgets but it doesn't seem to matter which widgets that
 we use the memory seems to grow.  I've tried using each widget individually
 with the same result.  The json that is returned is big, Firebug doesn't
 give me a value.  Our application polls for new information.
 I've also tried to use this tool:
 http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx
 But it didn't detect any leak in javascript.
 Unfortunatley this is an internal application so I can't point you to our
 application.  If it would be helpful I'll try and knock up a test case.
 Has anyone else had this problem?
 If so what was the solution?
 Thanks,
 Craig Spry
 


--~--~-~--~~~---~--~~
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-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Browser memory usage grows

2009-06-12 Thread Craig Spry
Hi,
I would just like to clarify your last point.  I thought that GWT took java
code and turned it into javascript, this is what
http://code.google.com/webtoolkit/overview.html seems to indicate, so when I
have deployed my application there is no java running just javascript, have
I missed something?

I suppose what I am trying to ask is do java memory leaks translate into
javascript memory leaks?

Thanks,
Craig Spry

On Fri, Jun 12, 2009 at 4:36 PM, David david.no...@gmail.com wrote:


 Hi,

 In the general case GWT's design guards against common JS pitfalls
 that cause memory leaks.

 There are a few known issues though:
 When you use IFrames that memory is never decently released after
 removing the IFrame.
 The FormPanel can also leak.

 IE6/IE7 are also consuming a huge amount of memory (half a megabyte
 per image sometimes) if you use ImageBundles.
 That is caused by the AlphaLoader trick they use to support
 transparent PNGs in IE6.
 I disabled this trick for IE7 and now everything runs a lot smoother.

 All other memory leaks are possible plain old Java leaks caused by not
 cleaning up or releasing references to objects in you application (so
 your fault!)

 David

 On Fri, Jun 12, 2009 at 1:41 AM, Craig Sprycraig.s...@gmail.com wrote:
  Hello All,
  We've built an application using GWT 1.5.4 that calls a json server and
 the
  memory usage for the browser that it is running in keeps going up, I've
  tested this in IE, Firefox and Chrome with the same result.  This
  application is a widget based application, we have a map widget(open
 street
  maps) and some list widgets but it doesn't seem to matter which widgets
 that
  we use the memory seems to grow.  I've tried using each widget
 individually
  with the same result.  The json that is returned is big, Firebug doesn't
  give me a value.  Our application polls for new information.
  I've also tried to use this tool:
  http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx
  But it didn't detect any leak in javascript.
  Unfortunatley this is an internal application so I can't point you to our
  application.  If it would be helpful I'll try and knock up a test case.
  Has anyone else had this problem?
  If so what was the solution?
  Thanks,
  Craig Spry
  
 

 


--~--~-~--~~~---~--~~
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-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Re: Browser memory usage grows

2009-06-12 Thread David

Hi,

The last type of memory leaks is independent of the language you use.
so yes, these leaks will translate from Java to Javascript.

The reason is because your code is faulty since it keeps hard
references to objects that are no longer necessary.

For example you might have a list of listeners on a Model in an MVC
and you might reuse the model in multiple views. If you remove the
view but you forget to remove it's listener on the Model then you will
have a big memory leak if you keep on using the model. Besides the
memory leak your application might become slower and slower as well.


David

On Fri, Jun 12, 2009 at 8:53 AM, Craig Sprycraig.s...@gmail.com wrote:
 Hi,
 I would just like to clarify your last point.  I thought that GWT took java
 code and turned it into javascript, this is
 what http://code.google.com/webtoolkit/overview.html seems to indicate, so
 when I have deployed my application there is no java running just
 javascript, have I missed something?
 I suppose what I am trying to ask is do java memory leaks translate into
 javascript memory leaks?
 Thanks,
 Craig Spry

 On Fri, Jun 12, 2009 at 4:36 PM, David david.no...@gmail.com wrote:

 Hi,

 In the general case GWT's design guards against common JS pitfalls
 that cause memory leaks.

 There are a few known issues though:
 When you use IFrames that memory is never decently released after
 removing the IFrame.
 The FormPanel can also leak.

 IE6/IE7 are also consuming a huge amount of memory (half a megabyte
 per image sometimes) if you use ImageBundles.
 That is caused by the AlphaLoader trick they use to support
 transparent PNGs in IE6.
 I disabled this trick for IE7 and now everything runs a lot smoother.

 All other memory leaks are possible plain old Java leaks caused by not
 cleaning up or releasing references to objects in you application (so
 your fault!)

 David

 On Fri, Jun 12, 2009 at 1:41 AM, Craig Sprycraig.s...@gmail.com wrote:
  Hello All,
  We've built an application using GWT 1.5.4 that calls a json server and
  the
  memory usage for the browser that it is running in keeps going up, I've
  tested this in IE, Firefox and Chrome with the same result.  This
  application is a widget based application, we have a map widget(open
  street
  maps) and some list widgets but it doesn't seem to matter which widgets
  that
  we use the memory seems to grow.  I've tried using each widget
  individually
  with the same result.  The json that is returned is big, Firebug doesn't
  give me a value.  Our application polls for new information.
  I've also tried to use this tool:
  http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx
  But it didn't detect any leak in javascript.
  Unfortunatley this is an internal application so I can't point you to
  our
  application.  If it would be helpful I'll try and knock up a test case.
  Has anyone else had this problem?
  If so what was the solution?
  Thanks,
  Craig Spry
  
 




 


--~--~-~--~~~---~--~~
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-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---



Browser memory usage grows

2009-06-11 Thread Craig Spry
Hello All,

We've built an application using GWT 1.5.4 that calls a json server and the
memory usage for the browser that it is running in keeps going up, I've
tested this in IE, Firefox and Chrome with the same result.  This
application is a widget based application, we have a map widget(open street
maps) and some list widgets but it doesn't seem to matter which widgets that
we use the memory seems to grow.  I've tried using each widget individually
with the same result.  The json that is returned is big, Firebug doesn't
give me a value.  Our application polls for new information.

I've also tried to use this tool:
http://blogs.msdn.com/gpde/pages/javascript-memory-leak-detector.aspx
But it didn't detect any leak in javascript.

Unfortunatley this is an internal application so I can't point you to our
application.  If it would be helpful I'll try and knock up a test case.

Has anyone else had this problem?
If so what was the solution?

Thanks,

Craig Spry

--~--~-~--~~~---~--~~
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-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~--~~~~--~~--~--~---