gnash-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-dev] Re: Potlatch photo and Gnash


From: strk
Subject: [Gnash-dev] Re: Potlatch photo and Gnash
Date: Mon, 14 Dec 2009 23:50:14 +0100

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! 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]