[storm] why weakrefdict for cache?

Bernd Dorn bernd.dorn at lovelysystems.com
Fri Aug 31 15:09:24 BST 2007



On 31.08.2007, at 15:01, Christopher Armstrong wrote:

> On 8/31/07, Christopher Armstrong <radix at twistedmatrix.com> wrote:
>
> To be extra-clear: this patch will cause many Storm applications  
> severe performance problems.

imho the memory consumption problem could be handled with explicit  
deallocation of objects

>
> I forgot to point out another problem. Clearing the cache like that  
> on invalidation will break the second major feature of the cache:  
> since the object will no longer be in the cache even if someone  
> else is holding a reference to it, if that object is loaded from  
> the database in the next transaction there will be two copies of it  
> in memory. Storm tries very hard to prevent this.
>

that's a god point ... even though i am not sure in which use-case  
one should store an object in memory which may magically change its  
values without getting the object from a specific place again explicitly


>
> -- 
> Christopher Armstrong
> International Man of Twistery
> http://radix.twistedmatrix.com/
> http://twistedmatrix.com/
> http://canonical.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/storm/attachments/20070831/57a515c8/attachment.htm 


More information about the storm mailing list