[fyi] Memory leak in Piggy Bank solved!

From: Stefano Mazzocchi <stefanom_at_mit.edu>
Date: Fri, 19 Aug 2005 01:15:55 -0400

This is to inform you that as of this afternoon, the SVN trunk of the
piggy-bank repository contains a version of PB that does not leak
memory, at least on Deerpark.

I still have to test it on firefox, but I think it should work fine
there as well.

For the technically curious, the leak was due to a run-away pointer in
the overlay.onLocationChange() function that kept a reference of the tab
browser object even after the tab had been closed.

This meant that no tab was ever garbage collected when piggy-bank was in
place (pretty nasty and shows why firefox became unresponsive after a
while, only for heavy tab users since the tabs were finally garbage
collected when the window was closed).

Yes, it was all David's fault :-), but I don't blame him for having
noticed... he's not a heavy tab users, apparently and it took me 3 weeks
of patient instrumentation and analysis of firefox internals + several
popular extentions (greasemonkey, for example) to understand everything
that went on.

But I'm happy I did, now I understand everything about the code (and a
ton more about firefox and how to program the moz platform) and I was
able to fix a number of other minor issues that I found during my leak hunt.

                                   - o -

Next in my todo list is to move on the java side of things and
understand why PB takes so much to start when first installed and try to
avoid it by either starting a second thread to do the calculations in
background while firefox starts, or precalculate the indexes and triple
store when building the distribution.

In the process, I'll try to update to the latest version of Sesame, even
if might not be that painless since SerQL is apparently back
incompatible :-(

Suggestions on this matter are highly appreciated, btw.

Stefano Mazzocchi
Research Scientist                 Digital Libraries Research Group
Massachusetts Institute of Technology            location: E25-131C
77 Massachusetts Ave                   telephone: +1 (617) 253-1096
Cambridge, MA  02139-4307              email: stefanom at mit . edu
Received on Fri Aug 19 2005 - 05:12:09 EDT

This archive was generated by hypermail 2.3.0 : Thu Aug 09 2012 - 16:39:18 EDT