Oh, just for the record, with the patch potlatch makes Gnash memory during load of photos go down to 544m (from almost 2Gb). 1.5Gb seems to be the memory cost of allocating ~55 temporary strings (one each character of the photo url, so variable) for each of the about 3500 photos in the XML file. Roughly 1.5B for 192500 temporary String objects ...
--strk; On Mon, Dec 14, 2009 at 11:50:14PM +0100, strk wrote: > Richard, you might have noticed the high activity on that > gnash bug item (http://savannah.gnu.org/bugs/index.php?28009) > > I'm trying to figure strategies to improve the garbage collecting > but meanwhile you might be interested in changing the potaltch > code a bit to reduce allocation of a lot of small temporary objects. > > Beside Gnash, this migth speed up things in other players too. > > Basically whenever you do <a_string>.length or <a_string>.subst > the player needs to create a String object from the literal string > and act on it. This temporary object stays around till the garbage > collector runs. In gnash this means getting around 2Gb of memory!!! > > The attached patch for potlatch uses the opcodes STRINGLENGTH and SUBSTR > instead of the GETPROPERTY and CALLMETHOD resulting from that syntax > in the innocent() function of photo.as: > > a.length is substituted with length(a) > a.substr(...) is substituted with substr(a, ...) > > Unfortunately it takes Ming CVS for the substr part to work > as I just fixed support for that. I'm hoping to release 0.4.3 > version of Ming ASAP. > > --strk; > > Free GIS & Flash consultant/developer () ASCII Ribbon Campaign > http://foo.keybit.net/~strk/services.html /\ Keep it simple! -- Free GIS & Flash consultant/developer () ASCII Ribbon Campaign http://foo.keybit.net/~strk/services.html /\ Keep it simple! _______________________________________________ Gnash-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnash-dev

