I was thinking (still on potlatch memory use)
that if we cached the objects synthetized for
primitive data types (string, number, boolan)
we could save a lot of temporary objects allocations.

In the potlatch case these are String objects syntetized
by primitive strings and are (which I belive is common)
always only used as read-only strings.

We could have AsStringValue, AsNumericValue and AsBooleanValue
objects storing the string and an Object cache.
The cache would be created on first to_object() call
and dropped on write.

Ideally the 'drop' part should even be an HARD delete
(but that's currently not possible with the current GC)
Still would open more possibilities like calling a
to be introduced GcResource::delete() function (which would
also be used by ActionDelete*) to help GC heuristic in evaluating
the usefulness of running a collection cycle.

So, what do you think ?

--strk; 

 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

Reply via email to