One of the Mozilla developer released a new extension to detect JS memory leaks: https://addons.mozilla.org/firefox/2490/ If it''s accurate, it might be bad news for Prototype. I have some code using prototype 1.4 with no leaks, but other code with 1.5 leaks on every single bindAsEventListener call, and a bunch of other places. Not sure if it''s just me; I may just be using it incorrectly on the one project. But, I can''t see anything at first glance to indicate that. Just downloaded the newer version of the plugin, so I''ll do some more digging. Anyone else used this yet? Greg _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Downgraded to scriptaculous 1.5.3 and prototype 1.4 and the leaks went away with the exact same code. So, it''s definitely a Prototype problem. Thomas, maybe you could talk to Sam about it. I''ve emailed him in the past, but he never responds. It probably has to do with the new Element.extend stuff (just a hunch since it was the most drastic change in the latest release). Greg ________________________________ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill Sent: Tuesday, May 09, 2006 8:46 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] anyone used the new firefox leak monitor? One of the Mozilla developer released a new extension to detect JS memory leaks: https://addons.mozilla.org/firefox/2490/ If it''s accurate, it might be bad news for Prototype. I have some code using prototype 1.4 with no leaks, but other code with 1.5 leaks on every single bindAsEventListener call, and a bunch of other places. Not sure if it''s just me; I may just be using it incorrectly on the one project. But, I can''t see anything at first glance to indicate that. Just downloaded the newer version of the plugin, so I''ll do some more digging. Anyone else used this yet? Greg _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Yes, I too am seeing tonnes of leaks with prototype 1.5. Will try downgrading to the version you mention and check again. Sigh! And I was thinking leaks only happen in IE ;) -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]On Behalf Of Gregory Hill Sent: Tuesday, May 09, 2006 8:23 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] anyone used the new firefox leak monitor? Downgraded to scriptaculous 1.5.3 and prototype 1.4 and the leaks went away with the exact same code. So, it''s definitely a Prototype problem. Thomas, maybe you could talk to Sam about it. I''ve emailed him in the past, but he never responds. It probably has to do with the new Element.extend stuff (just a hunch since it was the most drastic change in the latest release). Greg _____ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill Sent: Tuesday, May 09, 2006 8:46 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] anyone used the new firefox leak monitor? One of the Mozilla developer released a new extension to detect JS memory leaks: https://addons.mozilla.org/firefox/2490/ If it''s accurate, it might be bad news for Prototype. I have some code using prototype 1.4 with no leaks, but other code with 1.5 leaks on every single bindAsEventListener call, and a bunch of other places. Not sure if it''s just me; I may just be using it incorrectly on the one project. But, I can''t see anything at first glance to indicate that. Just downloaded the newer version of the plugin, so I''ll do some more digging. Anyone else used this yet? Greg _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
I noticed that when i closed a tab in Firefox whose page utilises prototype 1.4 i got a stream of leaks reported. Not sure if that would be expected ? Cheers Matt -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Maninder, Singh Sent: 09 May 2006 16:36 To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] anyone used the new firefox leak monitor? Yes, I too am seeing tonnes of leaks with prototype 1.5. Will try downgrading to the version you mention and check again. Sigh! And I was thinking leaks only happen in IE ;) -----Original Message----- From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]On Behalf Of Gregory Hill Sent: Tuesday, May 09, 2006 8:23 PM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails-spinoffs] anyone used the new firefox leak monitor? Downgraded to scriptaculous 1.5.3 and prototype 1.4 and the leaks went away with the exact same code. So, it''s definitely a Prototype problem. Thomas, maybe you could talk to Sam about it. I''ve emailed him in the past, but he never responds. It probably has to do with the new Element.extend stuff (just a hunch since it was the most drastic change in the latest release). Greg _____ From: rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Gregory Hill Sent: Tuesday, May 09, 2006 8:46 AM To: rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails-spinoffs] anyone used the new firefox leak monitor? One of the Mozilla developer released a new extension to detect JS memory leaks: https://addons.mozilla.org/firefox/2490/ <https://addons.mozilla.org/firefox/2490/> If it''s accurate, it might be bad news for Prototype. I have some code using prototype 1.4 with no leaks, but other code with 1.5 leaks on every single bindAsEventListener call, and a bunch of other places. Not sure if it''s just me; I may just be using it incorrectly on the one project. But, I can''t see anything at first glance to indicate that. Just downloaded the newer version of the plugin, so I''ll do some more digging. Anyone else used this yet? Greg *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorized and regulated by the Financial Services Authority This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our websites at: http://www.rbos.com http://www.rbsmarkets.com *********************************************************************************** _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
* SPENDLOVE, Matt, GBM wrote (11/05/06 09:45):> I noticed that when i closed a tab in Firefox whose page utilises > prototype 1.4 i got a stream of leaks reported. Not sure if that would > be expected ?I''ve just tried this on some code that I''ve recently I''ve been cleaning for IE leaks, so I''m reasonably aware of what to look for. I got lots of leak reports that seemed to be objects created by the bind() method. I found that making the unloadCache event run for Firefox made the leak reports go away. /* prevent memory leaks in IE */ //if (navigator.appVersion.match(/\bMSIE\b/)) <- commented this line Event.observe(window, ''unload'', Event.unloadCache, false); Which suggests that they are arising from event observers. I use bind() and bindAsEventListener() quite a lot. I''m using prototype v1.5.0_rc0 (downloaded with scriptaculous). Chris> > Cheers > > Matt > > -----Original Message----- > *From:* rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] *On Behalf Of > *Maninder, Singh > *Sent:* 09 May 2006 16:36 > *To:* rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > *Subject:* RE: [Rails-spinoffs] anyone used the new firefox leak > monitor? > > Yes, I too am seeing tonnes of leaks with prototype 1.5. > > Will try downgrading to the version you mention and check again. > > Sigh! And I was thinking leaks only happen in IE ;) > > -----Original Message----- > *From:* rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]*On Behalf > Of *Gregory Hill > *Sent:* Tuesday, May 09, 2006 8:23 PM > *To:* rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > *Subject:* RE: [Rails-spinoffs] anyone used the new firefox leak > monitor? > > Downgraded to scriptaculous 1.5.3 and prototype 1.4 and the > leaks went away with the exact same code. So, it''s definitely a > Prototype problem. > > > > Thomas, maybe you could talk to Sam about it. I''ve emailed him > in the past, but he never responds. It probably has to do with > the new Element.extend stuff (just a hunch since it was the most > drastic change in the latest release). > > > > Greg > > > > ------------------------------------------------------------------------ > > *From:* rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-spinoffs-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] *On Behalf > Of *Gregory Hill > *Sent:* Tuesday, May 09, 2006 8:46 AM > *To:* rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > *Subject:* [Rails-spinoffs] anyone used the new firefox leak > monitor? > > > > One of the Mozilla developer released a new extension to detect > JS memory leaks: > > > > https://addons.mozilla.org/firefox/2490/ > > > > If it''s accurate, it might be bad news for Prototype. I have > some code using prototype 1.4 with no leaks, but other code with > 1.5 leaks on every single bindAsEventListener call, and a bunch > of other places. Not sure if it''s just me; I may just be using > it incorrectly on the one project. But, I can''t see anything at > first glance to indicate that. > > > > Just downloaded the newer version of the plugin, so I''ll do > some more digging. Anyone else used this yet? > > > > Greg >
* Chris Lear wrote (11/05/06 10:44):> * SPENDLOVE, Matt, GBM wrote (11/05/06 09:45): >> I noticed that when i closed a tab in Firefox whose page utilises >> prototype 1.4 i got a stream of leaks reported. Not sure if that would >> be expected ? > > I''ve just tried this on some code that I''ve recently I''ve been cleaning > for IE leaks, so I''m reasonably aware of what to look for. > I got lots of leak reports that seemed to be objects created by the > bind() method. > I found that making the unloadCache event run for Firefox made the leak > reports go away. > > /* prevent memory leaks in IE */ > //if (navigator.appVersion.match(/\bMSIE\b/)) <- commented this line > Event.observe(window, ''unload'', Event.unloadCache, false); > > Which suggests that they are arising from event observers. I use bind() > and bindAsEventListener() quite a lot. > > I''m using prototype v1.5.0_rc0 (downloaded with scriptaculous).... Also see http://dev.rubyonrails.org/ticket/3726 for why my fix might be a bad idea. This also probably explains why prototype 1.4 shows no leaks - the unload event was unconditional. Chris