gnash-dev
[Top][All Lists]
Advanced

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

[Gnash-dev] Caching synthetized object of primary types


From: strk
Subject: [Gnash-dev] Caching synthetized object of primary types
Date: Thu, 17 Dec 2009 00:09:08 +0100

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! 




reply via email to

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